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 34 35 36
|
Description: C compiler flags:
1. Don't duplicate /usr/local in gcc search paths.
FIXME: Not sure why.
2. Respect CPPFLAGS
Forwarded: no
--- a/setup.py
+++ b/setup.py
@@ -483,8 +483,10 @@
# unfortunately, distutils doesn't let us provide separate C and C++
# compilers
if compiler is not None:
- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
+ (ccshared, cppflags, cflags) = \
+ sysconfig.get_config_vars('CCSHARED', 'CPPFLAGS', 'CFLAGS')
+ cppflags = ' '.join([f for f in cppflags.split() if not f.startswith('-I')])
+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cppflags + ' ' + cflags
self.compiler.set_executables(**args)
def build_extensions(self):
@@ -843,12 +845,7 @@
add_dir_to_list(dir_list, directory)
def configure_compiler(self):
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
- if not CROSS_COMPILING:
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ # On Debian /usr/local is always used, so we don't include it twice
# only change this for cross builds for 3.3, issues on Mageia
if CROSS_COMPILING:
self.add_cross_compiling_paths()
|