8000 BUG: Do not double-quote arguments to the command line · numpy/numpy@87d0528 · GitHub
[go: up one dir, main page]

Skip to content

Commit 87d0528

Browse files
committed
BUG: Do not double-quote arguments to the command line
After the recent patch to CCompiler.spawn, the file-paths no longer need manual quoting - that's handled as needed within subprocess. Fixes #12411
1 parent 1466e78 commit 87d0528

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

numpy/distutils/ccompiler.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from numpy.distutils.compat import get_exception
2020
from numpy.distutils.exec_command import filepath_from_subprocess_output
2121
from numpy.distutils.misc_util import cyg2win32, is_sequence, mingw32, \
22-
quote_args, get_num_build_jobs, \
22+
get_num_build_jobs, \
2323
_commandline_dep_string
2424

2525
# globals for parallel build management
@@ -772,8 +772,13 @@ def new_compiler (plat=None,
772772

773773
_distutils_gen_lib_options = gen_lib_options
774774
def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries):
775-
library_dirs = quote_args(library_dirs)
776-
runtime_library_dirs = quote_args(runtime_library_dirs)
775+
# the version of this function provided by CPython allows the following
776+
# to return lists, which are unpacked automatically:
777+
# - compiler.runtime_library_dir_option
778+
# our version extends the behavior to:
779+
# - compiler.library_dir_option
780+
# - compiler.library_option
781+
# - compiler.find_library_file
777782
r = _distutils_gen_lib_options(compiler, library_dirs,
778783
runtime_library_dirs, libraries)
779784
lib_opts = []
@@ -793,11 +798,6 @@ def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries):
793798
if _m is not None:
794799
setattr(_m, 'gen_lib_options', gen_lib_options)
795800

796-
_distutils_gen_preprocess_options = gen_preprocess_options
797-
def gen_preprocess_options (macros, include_dirs):
798-
include_dirs = quote_args(include_dirs)
799-
return _distutils_gen_preprocess_options(macros, include_dirs)
800-
ccompiler.gen_preprocess_options = gen_preprocess_options
801801

802802
##Fix distutils.util.split_quoted:
803803
# NOTE: I removed this fix in revision 4481 (see ticket #619), but it appears

0 commit comments

Comments
 (0)
0