Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 28f8b0c

Browse filesBrowse 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 bc6088b commit 28f8b0c
Copy full SHA for 28f8b0c

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎Lib/distutils/cygwinccompiler.py

Copy file name to clipboardExpand all lines: Lib/distutils/cygwinccompiler.py
+2-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.