summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Zachlod2025-04-24 10:50:03 +0000
committerRobert Marko2025-05-06 09:15:29 +0000
commitb4728c3e5ad95611e3c9b074aadcab017643186f (patch)
tree25b8134c8e6804b64b2f80dde3c2b0f1c6f68258
parentb0834b0265351c7e617a7c6398ebd5af0268d5e7 (diff)
downloadopenwrt-b4728c3e5ad95611e3c9b074aadcab017643186f.tar.gz
tools/ninja: fix build with python 3.13+
python 3.13 removed the pipes module. Replace pipes by shlex. shlex was introduced into python in 3.3 Signed-off-by: Arne Zachlod <arne@nerdkeller.org> Link: https://github.com/openwrt/openwrt/pull/18582 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--tools/ninja/patches/010-fix-python-no-pipes.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/ninja/patches/010-fix-python-no-pipes.patch b/tools/ninja/patches/010-fix-python-no-pipes.patch
new file mode 100644
index 0000000000..2dd421f72a
--- /dev/null
+++ b/tools/ninja/patches/010-fix-python-no-pipes.patch
@@ -0,0 +1,20 @@
+--- a/configure.py
++++ b/configure.py
+@@ -23,7 +23,7 @@ from __future__ import print_function
+
+ from optparse import OptionParser
+ import os
+-import pipes
++import shlex
+ import string
+ import subprocess
+ import sys
+@@ -264,7 +264,7 @@ n.variable('configure_args', ' '.join(co
+ env_keys = set(['CXX', 'AR', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS'])
+ configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys)
+ if configure_env:
+- config_str = ' '.join([k + '=' + pipes.quote(configure_env[k])
++ config_str = ' '.join([k + '=' + shlex.quote(configure_env[k])
+ for k in configure_env])
+ n.variable('configure_env', config_str + '$ ')
+ n.newline()