summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python/setuptweaks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python/setuptweaks.patch')
-rw-r--r--meta/recipes-devtools/python/python/setuptweaks.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python/setuptweaks.patch b/meta/recipes-devtools/python/python/setuptweaks.patch
new file mode 100644
index 0000000000..c34ef160d3
--- /dev/null
+++ b/meta/recipes-devtools/python/python/setuptweaks.patch
@@ -0,0 +1,57 @@
1This patch removes various ways native system options can pass into the python
2compilation and somehow break C modules.
3
4Upstream-Status: Configuration [OE Specific]
5
6RP 2012/04/23
7
8Index: Python-2.7.2/setup.py
9===================================================================
10--- Python-2.7.2.orig/setup.py 2012-04-23 20:03:47.295582553 +0000
11+++ Python-2.7.2/setup.py 2012-04-23 20:03:15.000000000 +0000
12@@ -231,7 +231,13 @@
13 # compilers
14 if compiler is not None:
15 (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
16- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
17+ # Need to filter out -isysroot from the flags. Ideally should
18+ # figure out target flags here.
19+ flags = []
20+ for f in cflags.split():
21+ if not f.startswith("-isystem"):
22+ flags.append(f)
23+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + ' '.join(flags)
24 self.compiler.set_executables(**args)
25
26 build_ext.build_extensions(self)
27@@ -393,7 +399,6 @@
28 # into configure and stored in the Makefile (issue found on OS X 10.3).
29 for env_var, arg_name, dir_list in (
30 ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
31- ('LDFLAGS', '-L', self.compiler.library_dirs),
32 ('CPPFLAGS', '-I', self.compiler.include_dirs)):
33 env_val = sysconfig.get_config_var(env_var)
34 if env_val:
35@@ -419,16 +424,16 @@
36 for directory in reversed(options.dirs):
37 add_dir_to_list(dir_list, directory)
38
39- if os.path.normpath(sys.prefix) != '/usr' \
40- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
41+# if os.path.normpath(sys.prefix) != '/usr' \
42+# and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
43 # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
44 # (PYTHONFRAMEWORK is set) to avoid # linking problems when
45 # building a framework with different architectures than
46 # the one that is currently installed (issue #7473)
47- add_dir_to_list(self.compiler.library_dirs,
48- sysconfig.get_config_var("LIBDIR"))
49- add_dir_to_list(self.compiler.include_dirs,
50- sysconfig.get_config_var("INCLUDEDIR"))
51+# add_dir_to_list(self.compiler.library_dirs,
52+# sysconfig.get_config_var("LIBDIR"))
53+# add_dir_to_list(self.compiler.include_dirs,
54+# sysconfig.get_config_var("INCLUDEDIR"))
55
56 try:
57 have_unicode = unicode