Skip to content

Commit

Permalink
Use shlex
Browse files Browse the repository at this point in the history
Co-authored-by: "Jason R. Coombs" <[email protected]>
  • Loading branch information
isuruf and jaraco committed Sep 21, 2021
1 parent f182b5e commit c51dc8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distutils/unixccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* link shared library handled by 'cc -shared'
"""

import os, sys, re
import os, sys, re, shlex

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

0 comments on commit c51dc8c

Please sign in to comment.