packages/lang/python/patches/001-cross-compile.patch
pavlov e834eda3ba working python 2.5... no threading, yet.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@7016 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-04-20 18:18:10 +00:00

38 lines
1.5 KiB
Diff

diff -ruNb Python-2.5.pris/setup.py Python-2.5/setup.py
--- Python-2.5.pris/setup.py 2007-04-19 17:06:20.170105250 -0500
+++ Python-2.5/setup.py 2007-04-19 17:07:14.257485500 -0500
@@ -244,7 +244,18 @@
return sys.platform
def detect_modules(self):
- # Ensure that /usr/local is always used
+ 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']
+ 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 specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
@@ -286,11 +297,8 @@
# 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 = []
config_h = sysconfig.get_config_h_filename()