[Python-checkins] python/dist/src/Lib/distutils sysconfig.py, 1.63, 1.64

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Mon Apr 25 00:26:40 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25974/Lib/distutils

Modified Files:
	sysconfig.py 
Log Message:
Introduced EXTRA_CFLAGS as an environment variable used by the Makefile.  Meant
to be used for flags that change binary compatibility.

Distutils was tweaked to also use the variable if used during compilation of
the interpreter.


Index: sysconfig.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- sysconfig.py	3 Mar 2005 11:08:02 -0000	1.63
+++ sysconfig.py	24 Apr 2005 22:26:38 -0000	1.64
@@ -146,8 +146,9 @@
     varies across Unices and is stored in Python's Makefile.
     """
     if compiler.compiler_type == "unix":
-        (cc, cxx, opt, basecflags, ccshared, ldshared, so_ext) = \
-            get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO')
+        (cc, cxx, opt, extra_cflags, basecflags, ccshared, ldshared, so_ext) = \
+            get_config_vars('CC', 'CXX', 'OPT', 'EXTRA_CFLAGS', 'BASECFLAGS',
+                            'CCSHARED', 'LDSHARED', 'SO')
 
         if os.environ.has_key('CC'):
             cc = os.environ['CC']
@@ -171,7 +172,7 @@
             opt = opt + ' ' + os.environ['CPPFLAGS']
             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
 
-        cc_cmd = cc + ' ' + opt
+        cc_cmd = ' '.join(str(x) for x in (cc, opt, extra_cflags) if x)
         compiler.set_executables(
             preprocessor=cpp,
             compiler=cc_cmd,



More information about the Python-checkins mailing list