components/python/python26/patches/Python26-03-distutils-pycc.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 118 049f3b3d6903
permissions -rw-r--r--
Close of build 10.
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,12 @@
             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
+        cc = '/usr/lib/python2.6/pycc'
+        cxx = '/usr/lib/python2.6/pyCC'
+        cpp = cc + " -E"
+
         if 'LDFLAGS' in os.environ:
             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
         if 'CFLAGS' in os.environ: