Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mail.openembedded.org (Postfix) with ESMTP id 69B5B7404E for ; Fri, 22 May 2015 16:38:20 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 22 May 2015 09:38:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,476,1427785200"; d="scan'208";a="698971328" Received: from yctb02.ostc.intel.com (HELO yctb02.otcr.intel.com) ([10.23.219.47]) by orsmga001.jf.intel.com with ESMTP; 22 May 2015 09:38:22 -0700 From: Alejandro Hernandez To: openembedded-core@lists.openembedded.org Date: Fri, 22 May 2015 09:37:50 +0000 Message-Id: <1432287470-28260-1-git-send-email-alejandro.hernandez@linux.intel.com> X-Mailer: git-send-email 1.8.4.5 Subject: [PATCH v2] python3-io: Fixes compilation of python3 ssl module X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2015 16:38:21 -0000 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] Signed-off-by: Alejandro Hernandez --- .../python/python3/fix_ssl_include_dir.patch | 41 ++++++++++++++++++++++ meta/recipes-devtools/python/python3_3.4.3.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta/recipes-devtools/python/python3/fix_ssl_include_dir.patch diff --git a/meta/recipes-devtools/python/python3/fix_ssl_include_dir.patch b/meta/recipes-devtools/python/python3/fix_ssl_include_dir.patch new file mode 100644 index 0000000..9972829 --- /dev/null +++ b/meta/recipes-devtools/python/python3/fix_ssl_include_dir.patch @@ -0,0 +1,41 @@ +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 + +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): diff --git a/meta/recipes-devtools/python/python3_3.4.3.bb b/meta/recipes-devtools/python/python3_3.4.3.bb index 120b594..f7f68cb 100644 --- a/meta/recipes-devtools/python/python3_3.4.3.bb +++ b/meta/recipes-devtools/python/python3_3.4.3.bb @@ -36,6 +36,7 @@ SRC_URI += "\ file://python3-setup.py-no-host-headers-libs.patch \ file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ + file://fix_ssl_include_dir.patch \ " SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5" SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8" -- 1.8.4.5