fix distutils.sysconfig traceback (patch 162)

This commit is contained in:
David Malcolm 2012-07-24 12:06:07 -04:00
parent 823581e851
commit 08ca53faca
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -up Python-3.3.0b1/Lib/distutils/sysconfig.py.fix-CC-options.patch Python-3.3.0b1/Lib/distutils/sysconfig.py
--- Python-3.3.0b1/Lib/distutils/sysconfig.py.fix-CC-options.patch 2012-07-24 11:57:43.804353959 -0400
+++ Python-3.3.0b1/Lib/distutils/sysconfig.py 2012-07-24 11:59:38.341354843 -0400
@@ -580,7 +580,9 @@ def get_config_vars(*args):
# skip checks if the compiler was overriden with a CC env variable
if 'CC' not in os.environ:
cc = oldcc = _config_vars['CC']
- if not find_executable(cc):
+ # CC might contain additional arguments e.g. "gcc -pthread", so
+ # look for the first word:
+ if not find_executable(cc.split()[0]):
# Compiler is not found on the shell search PATH.
# Now search for clang, first on PATH (if the Command LIne
# Tools have been installed in / or if the user has provided

View File

@ -483,6 +483,12 @@ Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
# Not yet sent upstream # Not yet sent upstream
Patch161: 00161-fix-test_tools-directory.patch Patch161: 00161-fix-test_tools-directory.patch
# 00162 #
# Fix a bug in distutils.sysconfig.get_config_vars() in which find_executable()
# would traceback when "CC" contains options (e.g. "gcc -pthread")
# Not yet sent upstream
Patch162: 00162-distutils-sysconfig-fix-CC-options.patch
# (New patches go here ^^^) # (New patches go here ^^^)
# #
# When adding new patches to "python" and "python3" in Fedora 17 onwards, # When adding new patches to "python" and "python3" in Fedora 17 onwards,
@ -715,6 +721,7 @@ done
#00159: FIXME #00159: FIXME
%patch160 -p1 %patch160 -p1
%patch161 -p1 %patch161 -p1
%patch162 -p1
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there # Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
# are many differences between 2.6 and the Python 3 library. # are many differences between 2.6 and the Python 3 library.
@ -1581,7 +1588,8 @@ test/test_email; add /usr/bin/pyvenv[-3.3] and venv module (PEP 405); add
_decimal and _lzma modules; make collections modules explicit in payload again _decimal and _lzma modules; make collections modules explicit in payload again
(upstream issue 11085); add _testbuffer module to tests subpackage (added in (upstream issue 11085); add _testbuffer module to tests subpackage (added in
upstream commit 3f9b3b6f7ff0); fix test failures (patches 160 and 161); upstream commit 3f9b3b6f7ff0); fix test failures (patches 160 and 161);
workaround erroneously shared _sysconfigdata.py upstream issue #14774 workaround erroneously shared _sysconfigdata.py upstream issue #14774; fix
distutils.sysconfig traceback (patch 162)
* Fri Jun 22 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-10 * Fri Jun 22 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-10
- use macro for power64 (rhbz#834653) - use macro for power64 (rhbz#834653)