File: distutils-sysconfig.diff

package info (click to toggle)
python2.6 2.6.6-8%2Bdeb6u3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 65,368 kB
  • ctags: 106,965
  • sloc: ansic: 389,033; python: 375,783; asm: 9,734; sh: 4,934; makefile: 4,120; lisp: 2,933; objc: 775; xml: 62
file content (33 lines) | stat: -rw-r--r-- 1,736 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# DP: Allow setting BASECFLAGS, OPT and EXTRA_LDFLAGS (like, CC, CXX, CPP,
# DP: CFLAGS, CPPFLAGS, CCSHARED, LDSHARED) from the environment.

Index: python2.6-2.6.5+20100521/Lib/distutils/sysconfig.py
===================================================================
--- python2.6-2.6.5+20100521.orig/Lib/distutils/sysconfig.py	2010-05-21 15:44:39.599722521 +0200
+++ python2.6-2.6.5+20100521/Lib/distutils/sysconfig.py	2010-05-21 15:44:39.607707825 +0200
@@ -169,8 +169,9 @@
     varies across Unices and is stored in Python's Makefile.
     """
     if compiler.compiler_type == "unix":
-        (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \
+        (cc, cxx, opt, cflags, opt, extra_cflags, basecflags, ccshared, ldshared, so_ext) = \
             get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+                            'OPT', 'EXTRA_CFLAGS', 'BASECFLAGS',
                             'CCSHARED', 'LDSHARED', 'SO')
 
         if 'CC' in os.environ:
@@ -185,8 +186,13 @@
             cpp = cc + " -E"           # not always
         if 'LDFLAGS' in os.environ:
             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
+        if 'BASECFLAGS' in os.environ:
+            basecflags = os.environ['BASECFLAGS']
+        if 'OPT' in os.environ:
+            opt = os.environ['OPT']
+        cflags = ' '.join(str(x) for x in (basecflags, opt, extra_cflags) if x)
         if 'CFLAGS' in os.environ:
-            cflags = opt + ' ' + os.environ['CFLAGS']
+            cflags = ' '.join(str(x) for x in (basecflags, opt, os.environ['CFLAGS'], extra_cflags) if x)
             ldshared = ldshared + ' ' + os.environ['CFLAGS']
         if 'CPPFLAGS' in os.environ:
             cpp = cpp + ' ' + os.environ['CPPFLAGS']