diff options
Diffstat (limited to 'meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch')
-rw-r--r-- | meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch new file mode 100644 index 0000000000..6ccdb948b9 --- /dev/null +++ b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | This patch skips over the 'import check' setup.py does when building | ||
2 | extensions. This generally won't work when cross-compiling. | ||
3 | |||
4 | Upstream-Status: Inappropriate [embedded-specific] | ||
5 | |||
6 | Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> | ||
7 | |||
8 | Index: Python-2.7.2/setup.py | ||
9 | =================================================================== | ||
10 | --- Python-2.7.2.orig/setup.py 2011-11-04 16:46:34.553796410 -0500 | ||
11 | +++ Python-2.7.2/setup.py 2011-11-04 16:59:49.692802313 -0500 | ||
12 | @@ -287,6 +287,15 @@ | ||
13 | (ext.name, sys.exc_info()[1])) | ||
14 | self.failed.append(ext.name) | ||
15 | return | ||
16 | + | ||
17 | + # If we're cross-compiling, we want to skip the import check | ||
18 | + # i.e. we shouldn't be dynamically loading target shared libs | ||
19 | + if os.environ.get('CROSS_COMPILE') is not None: | ||
20 | + self.announce( | ||
21 | + 'WARNING: skipping import check for cross-compiled "%s"' % | ||
22 | + ext.name) | ||
23 | + return | ||
24 | + | ||
25 | # Workaround for Mac OS X: The Carbon-based modules cannot be | ||
26 | # reliably imported into a command-line Python | ||
27 | if 'Carbon' in ext.extra_link_args: | ||