2007-01-23 18:18:54 +01:00
|
|
|
--- Python-2.4.2-001/setup.py 2007-01-23 16:18:37.000000000 +0100
|
|
|
|
+++ Python-2.4.2/setup.py 2007-01-23 16:26:43.000000000 +0100
|
|
|
|
@@ -239,7 +239,18 @@
|
2007-01-22 19:48:48 +01:00
|
|
|
return sys.platform
|
|
|
|
|
|
|
|
def detect_modules(self):
|
|
|
|
- # Ensure that /usr/local is always used
|
2007-01-23 18:18:54 +01:00
|
|
|
+ try:
|
|
|
|
+ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
|
|
|
|
+ except KeyError:
|
|
|
|
+ modules_include_dirs = ['/usr/include']
|
|
|
|
+ try:
|
|
|
|
+ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split()
|
|
|
|
+ except KeyError:
|
|
|
|
+ modules_lib_dirs = ['/usr/lib']
|
2007-01-22 19:48:48 +01:00
|
|
|
+ for dir in modules_include_dirs:
|
|
|
|
+ add_dir_to_list(self.compiler.include_dirs, dir)
|
|
|
|
+ for dir in modules_lib_dirs:
|
|
|
|
+ add_dir_to_list(self.compiler.library_dirs, dir)
|
|
|
|
|
|
|
|
# Add paths to popular package managers on OS X/darwin
|
|
|
|
if sys.platform == "darwin":
|
2007-01-23 18:18:54 +01:00
|
|
|
@@ -258,11 +269,8 @@
|
2007-01-22 19:48:48 +01:00
|
|
|
# lib_dirs and inc_dirs are used to search for files;
|
|
|
|
# if a file is found in one of those directories, it can
|
|
|
|
# be assumed that no additional -I,-L directives are needed.
|
|
|
|
- lib_dirs = self.compiler.library_dirs + [
|
|
|
|
- '/lib64', '/usr/lib64',
|
|
|
|
- '/lib', '/usr/lib',
|
|
|
|
- ]
|
|
|
|
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
|
|
|
|
+ lib_dirs = self.compiler.library_dirs
|
|
|
|
+ inc_dirs = self.compiler.include_dirs
|
|
|
|
exts = []
|
|
|
|
|
|
|
|
platform = self.get_platform()
|