components/python/python26/Python26-03-distutils-pycc.patch
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Wed, 23 Feb 2011 10:37:11 -0800
changeset 99 c15c9099bb44
permissions -rw-r--r--
6841644 OpenSolaris Python should support gdbm 6991811 Migrate Mercurial (Hg) to Python 2.6 7009592 PyOpenSSL should be updated from 0.8 to 0.11 7016735 move mercurial from sfw to userland 7018363 Userland LD_OPTIONS should include non-executable data mapfiles as well 7019410 python 2.6 should move to userland 7020772 userland build should provide more macros for common flags 7021204 userland runpath checking should relax slightly.

diff --git Python-2.6.4/Lib/distutils/sysconfig.py Python-2.6.4/Lib/distutils/sysconfig.py
--- Python-2.6.4/Lib/distutils/sysconfig.py
+++ Python-2.6.4/Lib/distutils/sysconfig.py
@@ -166,16 +166,10 @@
             get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
                             'CCSHARED', 'LDSHARED', 'SO')
 
-        if 'CC' in os.environ:
-            cc = os.environ['CC']
-        if 'CXX' in os.environ:
-            cxx = os.environ['CXX']
-        if 'LDSHARED' in os.environ:
-            ldshared = os.environ['LDSHARED']
-        if 'CPP' in os.environ:
-            cpp = os.environ['CPP']
-        else:
-            cpp = cc + " -E"           # not always
+        # On Solaris, we must always use pycc/pyCC, which will then look up
+        # $CC and $CXX
+        cpp = cc + " -E"
+
         if 'LDFLAGS' in os.environ:
             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
         if 'CFLAGS' in os.environ: