fix: use shlex than pipes to support python3.13 (#352)

This commit is contained in:
Catty Steve
2025-05-27 01:56:40 +08:00
committed by GitHub
parent 979092cf45
commit 89e9a46618

View File

@@ -4,7 +4,7 @@
import argparse
import os
import pipes
import shlex
import sys
import platform
@@ -82,7 +82,7 @@ class Generator(object):
env_keys = set(['CC', 'AR', 'LINK', 'CFLAGS', 'ARFLAGS', 'LINKFLAGS'])
configure_env = dict((key, os.environ[key]) for key in os.environ if key in env_keys)
if configure_env:
config_str = ' '.join([key + '=' + pipes.quote(configure_env[key]) for key in configure_env])
config_str = ' '.join([key + '=' + shlex.quote(configure_env[key]) for key in configure_env])
self.writer.variable('configure_env', config_str + '$ ')
if variables is None: