12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- --- Python-2.7.5.orig/setup.py 2013-05-12 05:32:54.000000000 +0200
- +++ Python-2.7.5/setup.py 2013-10-29 07:33:37.000000000 +0100
- @@ -74,7 +74,7 @@ def find_file(filename, std_dirs, paths)
- 'paths' is a list of additional locations to check; if the file is
- found in one of them, the resulting list will contain the directory.
- """
- - if host_platform == 'darwin':
- + if host_platform == 'darwin' and not cross_compiling:
- @@ -84,7 +84,7 @@ def find_file(filename, std_dirs, paths)
- for dir in std_dirs:
- f = os.path.join(dir, filename)
-
- - if host_platform == 'darwin' and is_macosx_sdk_path(dir):
- + if host_platform == 'darwin' and is_macosx_sdk_path(dir) and not cross_compiling:
- f = os.path.join(sysroot, dir[1:], filename)
-
- if os.path.exists(f): return []
- @@ -93,7 +93,7 @@ def find_file(filename, std_dirs, paths)
- for dir in paths:
- f = os.path.join(dir, filename)
-
- - if host_platform == 'darwin' and is_macosx_sdk_path(dir):
- + if host_platform == 'darwin' and is_macosx_sdk_path(dir) and not cross_compiling:
- f = os.path.join(sysroot, dir[1:], filename)
-
- if os.path.exists(f):
- @@ -107,7 +107,7 @@ def find_library_file(compiler, libname,
- if result is None:
- return None
-
- - if host_platform == 'darwin':
- + if host_platform == 'darwin' and not cross_compiling:
- sysroot = macosx_sdk_root()
- @@ -116,7 +116,7 @@ def find_library_file(compiler, libname,
- p = p.rstrip(os.sep)
-
- - if host_platform == 'darwin' and is_macosx_sdk_path(p):
- + if host_platform == 'darwin' and is_macosx_sdk_path(p) and not cross_compiling:
- if os.path.join(sysroot, p[1:]) == dirname:
- return [ ]
-
- @@ -129,7 +129,7 @@ def find_library_file(compiler, libname,
- p = p.rstrip(os.sep)
-
- - if host_platform == 'darwin' and is_macosx_sdk_path(p):
- + if host_platform == 'darwin' and is_macosx_sdk_path(p) and not cross_compiling:
- if os.path.join(sysroot, p[1:]) == dirname:
- return [ p ]
-
- @@ -437,10 +437,12 @@ class PyBuildExt(build_ext):
-
- def detect_modules(self):
- - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- + 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')
- self.add_gcc_paths()
- - self.add_multiarch_paths()
- + if not cross_compiling:
- + self.add_multiarch_paths()
- @@ -477,7 +479,8 @@ class PyBuildExt(build_ext):
- add_dir_to_list(dir_list, directory)
-
- if os.path.normpath(sys.prefix) != '/usr' \
- - and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
- + and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
- + and not cross_compiling:
- @@ -530,7 +533,7 @@ class PyBuildExt(build_ext):
- if host_platform == 'hp-ux11':
- lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']
-
- - if host_platform == 'darwin':
- + if host_platform == 'darwin' and not cross_compiling:
|