diff options
author | Developer-Ecosystem-Engineering <65677710+Developer-Ecosystem-Engineering@users.noreply.github.com> | 2021-11-18 14:31:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 14:31:58 -0800 |
commit | 5e9ce0c0529e3085498ac892941a020a65c7369a (patch) | |
tree | a70d9e941549b4a51b493f1b170ef33ce0d5a217 /numpy/distutils/unixccompiler.py | |
parent | 2ff7ab64d4e7d5928e96ca95b85350aa9caa2b63 (diff) | |
parent | 056abda14dab7fa8daf7a1ab44144aeb2250c216 (diff) | |
download | numpy-5e9ce0c0529e3085498ac892941a020a65c7369a.tar.gz |
Merge branch 'numpy:main' into as_min_max
Diffstat (limited to 'numpy/distutils/unixccompiler.py')
-rw-r--r-- | numpy/distutils/unixccompiler.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/numpy/distutils/unixccompiler.py b/numpy/distutils/unixccompiler.py index 733a9fc50..4884960fd 100644 --- a/numpy/distutils/unixccompiler.py +++ b/numpy/distutils/unixccompiler.py @@ -5,6 +5,7 @@ unixccompiler - can handle very long argument lists for ar. import os import sys import subprocess +import shlex from distutils.errors import CompileError, DistutilsExecError, LibError from distutils.unixccompiler import UnixCCompiler @@ -30,15 +31,15 @@ def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts if 'OPT' in os.environ: # XXX who uses this? from sysconfig import get_config_vars - opt = " ".join(os.environ['OPT'].split()) - gcv_opt = " ".join(get_config_vars('OPT')[0].split()) - ccomp_s = " ".join(self.compiler_so) + opt = shlex.join(shlex.split(os.environ['OPT'])) + gcv_opt = shlex.join(shlex.split(get_config_vars('OPT')[0])) + ccomp_s = shlex.join(self.compiler_so) if opt not in ccomp_s: ccomp_s = ccomp_s.replace(gcv_opt, opt) - self.compiler_so = ccomp_s.split() - llink_s = " ".join(self.linker_so) + self.compiler_so = shlex.split(ccomp_s) + llink_s = shlex.join(self.linker_so) if opt not in llink_s: - self.linker_so = llink_s.split() + opt.split() + self.linker_so = self.linker_so + shlex.split(opt) display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src) |