diff options
3 files changed, 31 insertions, 42 deletions
diff --git a/meta/recipes-devtools/python/python3/fix_ssl_include_dir.patch b/meta/recipes-devtools/python/python3/fix_ssl_include_dir.patch deleted file mode 100644 index 9972829c78..0000000000 --- a/meta/recipes-devtools/python/python3/fix_ssl_include_dir.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [Embedded Specific] | ||
2 | |||
3 | Python 3 fails to compile the ssl module, later, when requesting to install packages that should include such modules | ||
4 | no error is shown; but a running python shell trying to import the ssl library results in an import error, | ||
5 | since it was never installed. | ||
6 | |||
7 | This looks for the modules in the correct directories so they are corretcly compiled and installed along with python3. | ||
8 | |||
9 | ImportError: No module named _ssl | ||
10 | |||
11 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
12 | |||
13 | Index: Python-3.4.3/setup.py | ||
14 | =================================================================== | ||
15 | --- Python-3.4.3.orig/setup.py | ||
16 | +++ Python-3.4.3/setup.py | ||
17 | @@ -726,10 +726,9 @@ class PyBuildExt(build_ext): | ||
18 | exts.append( Extension('_socket', ['socketmodule.c'], | ||
19 | depends = ['socketmodule.h']) ) | ||
20 | # Detect SSL support for the socket module (via _ssl) | ||
21 | - search_for_ssl_incs_in = [ | ||
22 | - '/usr/local/ssl/include', | ||
23 | - '/usr/contrib/ssl/include/' | ||
24 | - ] | ||
25 | + search_for_ssl_incs_in = [] | ||
26 | + for dir in [os.getenv("STAGING_INCDIR")]: | ||
27 | + search_for_ssl_incs_in.append(dir) | ||
28 | ssl_incs = find_file('openssl/ssl.h', inc_dirs, | ||
29 | search_for_ssl_incs_in | ||
30 | ) | ||
31 | @@ -739,9 +738,7 @@ class PyBuildExt(build_ext): | ||
32 | if krb5_h: | ||
33 | ssl_incs += krb5_h | ||
34 | ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, | ||
35 | - ['/usr/local/ssl/lib', | ||
36 | - '/usr/contrib/ssl/lib/' | ||
37 | - ] ) | ||
38 | + [os.getenv("STAGING_LIBDIR")]) | ||
39 | |||
40 | if (ssl_incs is not None and | ||
41 | ssl_libs is not None): | ||
diff --git a/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch b/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch new file mode 100644 index 0000000000..f26bd38b02 --- /dev/null +++ b/meta/recipes-devtools/python/python3/setup.py-find-libraries-in-staging-dirs.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Patch setup.py so that the detect_modules() function looks for required | ||
2 | libraries and headers in STAGING_LIBDIR / STAGING_INCDIR. | ||
3 | |||
4 | Without this patch, several extension modules are not built, even though | ||
5 | their dependencies are present in the compiler's search paths. | ||
6 | The result is the following warning, and ultimately incomplete packages: | ||
7 | |||
8 | | The necessary bits to build these optional modules were not found: | ||
9 | | _bz2 _curses_panel _dbm | ||
10 | | _gdbm _lzma _sqlite3 | ||
11 | | nis readline zlib | ||
12 | | To find the necessary bits, look in setup.py in detect_modules() for the module's name. | ||
13 | |||
14 | Upstream-Status: Inappropriate [Cross compile specific] | ||
15 | |||
16 | Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> | ||
17 | |||
18 | Index: Python-3.4.3/setup.py | ||
19 | =================================================================== | ||
20 | --- Python-3.4.3.orig/setup.py | ||
21 | +++ Python-3.4.3/setup.py | ||
22 | @@ -521,6 +521,8 @@ class PyBuildExt(build_ext): | ||
23 | else: | ||
24 | lib_dirs = self.compiler.library_dirs[:] | ||
25 | inc_dirs = self.compiler.include_dirs[:] | ||
26 | + lib_dirs.append(os.environ.get('STAGING_LIBDIR')) | ||
27 | + inc_dirs.append(os.environ.get('STAGING_INCDIR')) | ||
28 | exts = [] | ||
29 | missing = [] | ||
30 | |||
diff --git a/meta/recipes-devtools/python/python3_3.4.3.bb b/meta/recipes-devtools/python/python3_3.4.3.bb index dce778a593..e2d9f796f1 100644 --- a/meta/recipes-devtools/python/python3_3.4.3.bb +++ b/meta/recipes-devtools/python/python3_3.4.3.bb | |||
@@ -36,7 +36,7 @@ SRC_URI += "\ | |||
36 | file://python3-setup.py-no-host-headers-libs.patch \ | 36 | file://python3-setup.py-no-host-headers-libs.patch \ |
37 | file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ | 37 | file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ |
38 | file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ | 38 | file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ |
39 | file://fix_ssl_include_dir.patch \ | 39 | file://setup.py-find-libraries-in-staging-dirs.patch \ |
40 | " | 40 | " |
41 | SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5" | 41 | SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5" |
42 | SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8" | 42 | SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8" |