[python3/python3.3] fix distutils.sysconfig traceback (patch 162)

dmalcolm dmalcolm at fedoraproject.org
Tue Jul 24 16:07:10 UTC 2012


commit 08ca53faca8807e231edc2a9ab4a75e4625f69e5
Author: David Malcolm <dmalcolm at redhat.com>
Date:   Tue Jul 24 12:06:07 2012 -0400

    fix distutils.sysconfig traceback (patch 162)

 00162-distutils-sysconfig-fix-CC-options.patch |   14 ++++++++++++++
 python3.spec                                   |   10 +++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/00162-distutils-sysconfig-fix-CC-options.patch b/00162-distutils-sysconfig-fix-CC-options.patch
new file mode 100644
index 0000000..ac8d3f2
--- /dev/null
+++ b/00162-distutils-sysconfig-fix-CC-options.patch
@@ -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
diff --git a/python3.spec b/python3.spec
index b68ef15..5ee688d 100644
--- a/python3.spec
+++ b/python3.spec
@@ -483,6 +483,12 @@ Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
 # Not yet sent upstream
 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 ^^^)
 #
 # When adding new patches to "python" and "python3" in Fedora 17 onwards,
@@ -715,6 +721,7 @@ done
 #00159: FIXME
 %patch160 -p1
 %patch161 -p1
+%patch162 -p1
 
 # 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.
@@ -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
 (upstream issue 11085); add _testbuffer module to tests subpackage (added in
 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 at redhat.com> - 3.2.3-10
 - use macro for power64 (rhbz#834653)


More information about the scm-commits mailing list