Skip to content

Commit c51dc8c

Browse files
isurufjaraco
andcommitted
Use shlex
Co-authored-by: "Jason R. Coombs" <[email protected]>
1 parent f182b5e commit c51dc8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

distutils/unixccompiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* link shared library handled by 'cc -shared'
1414
"""
1515

16-
import os, sys, re
16+
import os, sys, re, shlex
1717

1818
from distutils import sysconfig
1919
from distutils.dep_util import newer
@@ -231,7 +231,7 @@ def runtime_library_dir_option(self, dir):
231231
# this time, there's no way to determine this information from
232232
# the configuration data stored in the Python installation, so
233233
# we use this hack.
234-
compiler = os.path.basename(sysconfig.get_config_var("CC").split(" ")[0])
234+
compiler = os.path.basename(shlex.split(sysconfig.get_config_var("CC"))[0])
235235
if sys.platform[:6] == "darwin":
236236
from distutils.util import get_macosx_target_ver, split_version
237237
macosx_target_ver = get_macosx_target_ver()

0 commit comments

Comments
 (0)