mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 18:04:48 +00:00
pylibfdt: Fix "invalid escape sequence '\w'" in setup.py
Once u-boot's build system invokes python3 scripts/dtc/pylibfdt/setup.py --quiet build_ext --inplace it may fail with scripts/dtc/pylibfdt/setup.py:40: SyntaxWarning: invalid escape sequence '\w' RE_KEY_VALUE = re.compile('(?P<key>\w+) *(?P<plus>[+])?= *(?P<value>.*)$') depending on the used Python version. Explicitly mark the regex string as raw string to avoid the warning. Signed-off-by: Florian Schmaus <flo@geekplace.eu> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
72703c7a0d
commit
d4c84d7062
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ with open(os.path.join(srcdir, "../README"), "r") as fh:
|
|||
long_description = fh.read()
|
||||
|
||||
# Decodes a Makefile assignment line into key and value (and plus for +=)
|
||||
RE_KEY_VALUE = re.compile('(?P<key>\w+) *(?P<plus>[+])?= *(?P<value>.*)$')
|
||||
RE_KEY_VALUE = re.compile(r'(?P<key>\w+) *(?P<plus>[+])?= *(?P<value>.*)$')
|
||||
|
||||
def get_top_builddir():
|
||||
if '--top-builddir' in sys.argv:
|
||||
|
|
Loading…
Add table
Reference in a new issue