summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-12-18 09:54:32 -0500
committerGitHub <noreply@github.com>2021-12-18 09:54:32 -0500
commite63d02287b1c4c8b7e979c35407c8f034e60059c (patch)
tree2ddd7c0446a298609f4f9dc60c0f87d488018699
parent7b0831623f024ad9b5c35ca636c72a338f1ab891 (diff)
parent629f8ff0517d090dd6931794161d67d64673b016 (diff)
downloadpython-setuptools-git-e63d02287b1c4c8b7e979c35407c8f034e60059c.tar.gz
Merge pull request #80 from lazka/fix-cc-command-line
cygwinccompiler: Split CC env var before passing to subprocess
-rw-r--r--distutils/cygwinccompiler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
index ad6cc44b..09be5ba2 100644
--- a/distutils/cygwinccompiler.py
+++ b/distutils/cygwinccompiler.py
@@ -50,6 +50,7 @@ cygwin in no-cygwin mode).
import os
import sys
import copy
+import shlex
from subprocess import Popen, PIPE, check_output
import re
@@ -421,5 +422,5 @@ def get_versions():
def is_cygwincc(cc):
'''Try to determine if the compiler that would be used is from cygwin.'''
- out_string = check_output([cc, '-dumpmachine'])
+ out_string = check_output(shlex.split(cc) + ['-dumpmachine'])
return out_string.strip().endswith(b'cygwin')