summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangYoun Kwak <sy.kwak@samsung.com>2024-06-21 17:17:05 +0900
committerSangYoun Kwak <sy.kwak@samsung.com>2024-06-21 18:26:47 +0900
commit5319b08010b3d72d46bdb8c1fdaa9e0101b8c938 (patch)
tree218bf473af716f080cd3622bf190aca0b8b63b71
parent9cd9025bd011eea181e10d50a8ffec6cdc8a8e86 (diff)
downloadrootstrap-5319b08010b3d72d46bdb8c1fdaa9e0101b8c938.tar.gz
rootstrap-5319b08010b3d72d46bdb8c1fdaa9e0101b8c938.tar.bz2
rootstrap-5319b08010b3d72d46bdb8c1fdaa9e0101b8c938.zip
modify_pc: Modify to remove regex syntax warning
The '\s' in the regex for python means whitespace. Also, '\' is used for escape sequence, so '\s' is ambiguous. In python, to remove this ambiguity, '\\s' is used for whitespace. In modify_pc.py script, '\s' is used so python raises warning. To remove this warning, '\s' is replaced with '\\s'. Change-Id: Ic879fa46d5919082a4b6ab8a3294dff19e61a0dc Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
-rwxr-xr-xmodify_pc.py6
-rw-r--r--packaging/hal-rootstrap.spec1
2 files changed, 4 insertions, 3 deletions
diff --git a/modify_pc.py b/modify_pc.py
index b86e2ec..771d674 100755
--- a/modify_pc.py
+++ b/modify_pc.py
@@ -6,9 +6,9 @@ from re import compile as regex_compile
include_dir_root_path = "hal_rootstrap_dir"
-regex_assignment = regex_compile("\s*([-_a-zA-Z0-9]+)\s*=\s*([^\s]*)")
-regex_declaration = regex_compile("\s*([-_a-zA-Z0-9]+)\s*:\s*(.+)\s*")
-regex_substitution = regex_compile("\${([-_a-zA-Z0-9]+)}")
+regex_assignment = regex_compile("\\s*([-_a-zA-Z0-9]+)\\s*=\\s*([^\\s]*)")
+regex_declaration = regex_compile("\\s*([-_a-zA-Z0-9]+)\\s*:\\s*(.+)\\s*")
+regex_substitution = regex_compile("\\${([-_a-zA-Z0-9]+)}")
libs = { "-L${" + include_dir_root_path + "}" }
cflags = { "-I${" + include_dir_root_path + "}" }
diff --git a/packaging/hal-rootstrap.spec b/packaging/hal-rootstrap.spec
index 5e97714..8086583 100644
--- a/packaging/hal-rootstrap.spec
+++ b/packaging/hal-rootstrap.spec
@@ -14,6 +14,7 @@ ExcludeArch: riscv64
BuildRequires: cmake
BuildRequires: xmlstarlet
+BuildRequires: python3
BuildRequires: capi-base-common
BuildRequires: capi-base-common-devel