Skip to content

Commit 951d58c

Browse files
committed
distutils: split CC env var before passing to subprocess
In case CC="ccache gcc" then subprocess would interpret it as one command and fail to find it. Instead split the command line into separate arguments. Fixes python#53
1 parent f359056 commit 951d58c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/distutils/cygwinccompiler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import os
5151
import sys
5252
import copy
53+
import shlex
5354

5455
from distutils.unixccompiler import UnixCCompiler
5556
from distutils.file_util import write_file
@@ -353,5 +354,5 @@ def check_config_h():
353354

354355
def is_cygwincc(cc):
355356
'''Try to determine if the compiler that would be used is from cygwin.'''
356-
out_string = check_output([cc, '-dumpmachine'])
357+
out_string = check_output(shlex.split(cc) + ['-dumpmachine'])
357358
return out_string.strip().endswith(b'cygwin')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy