update to current HEAD
[buildroot.git] / package / python / python-002-cross-compile.patch
blob207335a5e366a865e6f787e5804790509ad534b5
1 --- Python-2.4.2-001/setup.py 2007-01-23 16:18:37.000000000 +0100
2 +++ Python-2.4.2/setup.py 2007-01-23 16:26:43.000000000 +0100
3 @@ -239,7 +239,18 @@
4 return sys.platform
6 def detect_modules(self):
7 - # Ensure that /usr/local is always used
8 + try:
9 + modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
10 + except KeyError:
11 + modules_include_dirs = ['/usr/include']
12 + try:
13 + modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split()
14 + except KeyError:
15 + modules_lib_dirs = ['/usr/lib']
16 + for dir in modules_include_dirs:
17 + add_dir_to_list(self.compiler.include_dirs, dir)
18 + for dir in modules_lib_dirs:
19 + add_dir_to_list(self.compiler.library_dirs, dir)
21 # Add paths to popular package managers on OS X/darwin
22 if sys.platform == "darwin":
23 @@ -258,11 +269,8 @@
24 # lib_dirs and inc_dirs are used to search for files;
25 # if a file is found in one of those directories, it can
26 # be assumed that no additional -I,-L directives are needed.
27 - lib_dirs = self.compiler.library_dirs + [
28 - '/lib64', '/usr/lib64',
29 - '/lib', '/usr/lib',
30 - ]
31 - inc_dirs = self.compiler.include_dirs + ['/usr/include']
32 + lib_dirs = self.compiler.library_dirs
33 + inc_dirs = self.compiler.include_dirs
34 exts = []
36 platform = self.get_platform()