mirror of
https://git.yoctoproject.org/poky
synced 2026-02-05 16:28:43 +01:00
During python3 compilation, the module ssl was being skippped due to the fact that the compilation script couldnt find the required files, this patch fixes setup.py so it looks for the files in the correct directory, hence fixing its compilation and installation. [YOCTO #7768] (From OE-Core rev: 4cffb16b0edc353d4a3287ca59ba02640f605d2b) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
Upstream-Status: Inappropriate [Embedded Specific]
|
|
|
|
Python 3 fails to compile the ssl module, later, when requesting to install packages that should include such modules
|
|
no error is shown; but a running python shell trying to import the ssl library results in an import error,
|
|
since it was never installed.
|
|
|
|
This looks for the modules in the correct directories so they are corretcly compiled and installed along with python3.
|
|
|
|
ImportError: No module named _ssl
|
|
|
|
Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
|
|
|
|
Index: Python-3.4.3/setup.py
|
|
===================================================================
|
|
--- Python-3.4.3.orig/setup.py
|
|
+++ Python-3.4.3/setup.py
|
|
@@ -726,10 +726,9 @@ class PyBuildExt(build_ext):
|
|
exts.append( Extension('_socket', ['socketmodule.c'],
|
|
depends = ['socketmodule.h']) )
|
|
# Detect SSL support for the socket module (via _ssl)
|
|
- search_for_ssl_incs_in = [
|
|
- '/usr/local/ssl/include',
|
|
- '/usr/contrib/ssl/include/'
|
|
- ]
|
|
+ search_for_ssl_incs_in = []
|
|
+ for dir in [os.getenv("STAGING_INCDIR")]:
|
|
+ search_for_ssl_incs_in.append(dir)
|
|
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
|
|
search_for_ssl_incs_in
|
|
)
|
|
@@ -739,9 +738,7 @@ class PyBuildExt(build_ext):
|
|
if krb5_h:
|
|
ssl_incs += krb5_h
|
|
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
|
- ['/usr/local/ssl/lib',
|
|
- '/usr/contrib/ssl/lib/'
|
|
- ] )
|
|
+ [os.getenv("STAGING_LIBDIR")])
|
|
|
|
if (ssl_incs is not None and
|
|
ssl_libs is not None):
|