summaryrefslogtreecommitdiff
path: root/recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2024-10-31 14:35:01 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2024-10-31 14:35:01 +0530
commit8a6cb0a058349b3b98bd94f36edb6c12ace7c25f (patch)
treee06a09b008eec79489550e2228ad3738d2e3c576 /recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch
parent5e64bd476e07f92e9a5092130d2ae6407025d045 (diff)
ninja.recipe: Fix python 3.13 compat, used by Fedora 411.24.9
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1620>
Diffstat (limited to 'recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch')
-rw-r--r--recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch b/recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch
new file mode 100644
index 00000000..2d8448f4
--- /dev/null
+++ b/recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch
@@ -0,0 +1,36 @@
+From 4b32663bf04a54818664081bb448b4c9d10c3371 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek@centricular.com>
+Date: Thu, 31 Oct 2024 14:32:18 +0530
+Subject: [PATCH] configure.py: Move from pipes to shlex
+
+pipes.quote uses shlex.quote internally anyway, and pipes has been
+removed with Python 3.13
+---
+ configure.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.py b/configure.py
+index f5e5e3b..56f31fb 100755
+--- 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
+@@ -268,7 +268,7 @@ n.variable('configure_args', ' '.join(configure_args))
+ 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.46.1
+