diff options
author | Byoungchan Lee <byoungchan.lee@gmx.com> | 2023-10-09 11:13:20 (GMT) |
---|---|---|
committer | Byoungchan Lee <byoungchan.lee@gmx.com> | 2023-10-09 11:15:23 (GMT) |
commit | 9cf13cd1ecb7ae649394f4133d121a01e191560b (patch) | |
tree | b7993c4d4f7e84d5a007ae3fab0e5d1aeaec3d5c /configure.py | |
parent | b84b3501c63042e72b05c90c76d75e0381daa4cf (diff) | |
download | Ninja-9cf13cd1ecb7ae649394f4133d121a01e191560b.zip Ninja-9cf13cd1ecb7ae649394f4133d121a01e191560b.tar.gz Ninja-9cf13cd1ecb7ae649394f4133d121a01e191560b.tar.bz2 |
Replace pipes.quote with shlex.quote in configure.py
Python 3.12 deprecated the pipes module and it will be removed
in Python 3.13. In configure.py, I have replaced the usage of pipes.quote
with shlex.quote, which is the exactly same function as pipes.quote.
For more details, refer to PEP 0594: https://peps.python.org/pep-0594
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.py b/configure.py index 588250a..c6973cd 100755 --- a/configure.py +++ b/configure.py @@ -21,7 +21,7 @@ or use a meta-build system that supports Ninja output.""" from optparse import OptionParser import os -import pipes +import shlex import string import subprocess import sys @@ -262,7 +262,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() |