summaryrefslogtreecommitdiff
path: root/scripts/dtc
diff options
context:
space:
mode:
authorFlorian Schmaus <flo@geekplace.eu>2024-02-20 08:52:48 -0500
committerSeung-Woo Kim <sw0312.kim@samsung.com>2024-08-01 09:37:43 +0900
commita2b2d60af10ffe5e05e09bbccb12e8a365835907 (patch)
tree0d7018ef95fe055aaf81e7fa29e05d6bccc82151 /scripts/dtc
parent0974a9f2001aeffca853f41db50ab1fff52e61f8 (diff)
downloadu-boot-a2b2d60af10ffe5e05e09bbccb12e8a365835907.tar.gz
u-boot-a2b2d60af10ffe5e05e09bbccb12e8a365835907.tar.bz2
u-boot-a2b2d60af10ffe5e05e09bbccb12e8a365835907.zip
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> [sw0312.kim: cherry-pick upstream commit d4c84d7062ec to resolve script warning] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I5b53521afea61a07fa36725cb9ceedb4545ee188
Diffstat (limited to 'scripts/dtc')
-rwxr-xr-xscripts/dtc/pylibfdt/setup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dtc/pylibfdt/setup.py b/scripts/dtc/pylibfdt/setup.py
index 8baae08770..c6fe5a6a44 100755
--- a/scripts/dtc/pylibfdt/setup.py
+++ b/scripts/dtc/pylibfdt/setup.py
@@ -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: