From b4728c3e5ad95611e3c9b074aadcab017643186f Mon Sep 17 00:00:00 2001 From: Arne Zachlod Date: Thu, 24 Apr 2025 12:50:03 +0200 Subject: [PATCH] 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 Link: https://github.com/openwrt/openwrt/pull/18582 Signed-off-by: Robert Marko --- .../patches/010-fix-python-no-pipes.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tools/ninja/patches/010-fix-python-no-pipes.patch 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() -- 2.30.2