From ed5cd3e2ced80cbdde5c18b74a0aceec1f38867c Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Fri, 6 Jan 2017 16:46:39 +0200 Subject: [PATCH 1/7] python: remove Host/Install rule default add I just found out that, that the BUILD_VARIANT var is not set for the host build, so technically this code would never get used. Signed-off-by: Alexandru Ardelean --- lang/python/files/python-host.mk | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lang/python/files/python-host.mk b/lang/python/files/python-host.mk index 7833a0c73..945a2ef65 100644 --- a/lang/python/files/python-host.mk +++ b/lang/python/files/python-host.mk @@ -84,13 +84,4 @@ define HostPy/Compile/Default ) endef -ifeq ($(BUILD_VARIANT),python) -define Host/Compile - $(call HostPy/Compile/Default) -endef - -define Host/Install -endef -endif # python - endif # __python_host_mk_inc From 3bfdf6797b0f1073a617d697d08075e13496f19f Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 11 Jan 2017 11:05:11 +0200 Subject: [PATCH 2/7] python: drop CFLAGS in HOST_CONFIGURE_ARGS ; it's already in HOST_CONFIGURE_VARS Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index fbdd06cd5..b0d4330db 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -237,8 +237,7 @@ HOST_CONFIGURE_ARGS+= \ --exec-prefix=$(HOST_PYTHON_DIR) \ --with-system-expat=$(STAGING_DIR_HOSTPKG) \ --with-system-ffi \ - CONFIG_SITE= \ - CFLAGS="$(HOST_CFLAGS)" + CONFIG_SITE= define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) install From 515468346a77e8ef75c30b98047009fa5c16651b Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 11 Jan 2017 11:07:22 +0200 Subject: [PATCH 3/7] Revert "python: don't use libressl for host build" This reverts commit ca800e60b040a2b409801560dc16dbcac6cba2b1. --- lang/python/Makefile | 2 +- ...12-disable-openssl-for-hashlib-on-host-build.patch | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 lang/python/patches/012-disable-openssl-for-hashlib-on-host-build.patch diff --git a/lang/python/Makefile b/lang/python/Makefile index b0d4330db..ae9a2146e 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -12,7 +12,7 @@ include ./files/python-version.mk PKG_NAME:=python PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) diff --git a/lang/python/patches/012-disable-openssl-for-hashlib-on-host-build.patch b/lang/python/patches/012-disable-openssl-for-hashlib-on-host-build.patch deleted file mode 100644 index 1a442e0f8..000000000 --- a/lang/python/patches/012-disable-openssl-for-hashlib-on-host-build.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -859,7 +859,7 @@ class PyBuildExt(build_ext): - - min_openssl_ver = 0x00907000 - have_any_openssl = ssl_incs is not None and ssl_libs is not None -- have_usable_openssl = (have_any_openssl and -+ have_usable_openssl = cross_compiling and (have_any_openssl and - openssl_ver >= min_openssl_ver) - - if have_any_openssl: From ee88853e04b3caa2bdbfd73a5d991baebf59df10 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 11 Jan 2017 11:06:57 +0200 Subject: [PATCH 4/7] python: link with static libs of ssl, crypto for host builds Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lang/python/Makefile b/lang/python/Makefile index ae9a2146e..ed708b578 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -229,6 +229,9 @@ define PyPackage/python/filespec -|$(PYTHON_PKG_DIR) endef +HOST_LDFLAGS += \ + $$$$(pkg-config --static --libs libcrypto libssl) + HOST_CONFIGURE_ARGS+= \ --without-cxx-main \ --without-pymalloc \ From 4e2f4a76e35a3bfe880abf6f425ef688a25aebc2 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 11 Jan 2017 15:04:03 +0200 Subject: [PATCH 5/7] python: use built-in libffi lib for host build Python comes with it's own builtin libffi lib, which seems easier to use for the host build, than trying to use the one from the package feeds. Also, dropping `005-fix-libffi-x86-64-configure.patch` Not needed anymore. Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 4 +-- .../005-fix-libffi-x86-64-configure.patch | 31 ------------------- 2 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 lang/python/patches/005-fix-libffi-x86-64-configure.patch diff --git a/lang/python/Makefile b/lang/python/Makefile index ed708b578..d854be50b 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -36,7 +36,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) PKG_BUILD_DEPENDS:=python/host -HOST_BUILD_DEPENDS:=bzip2/host expat/host libffi/host +HOST_BUILD_DEPENDS:=bzip2/host expat/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -239,7 +239,7 @@ HOST_CONFIGURE_ARGS+= \ --prefix=$(HOST_PYTHON_DIR) \ --exec-prefix=$(HOST_PYTHON_DIR) \ --with-system-expat=$(STAGING_DIR_HOSTPKG) \ - --with-system-ffi \ + --with-system-ffi=no \ CONFIG_SITE= define Host/Install diff --git a/lang/python/patches/005-fix-libffi-x86-64-configure.patch b/lang/python/patches/005-fix-libffi-x86-64-configure.patch deleted file mode 100644 index ea062a350..000000000 --- a/lang/python/patches/005-fix-libffi-x86-64-configure.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/Modules/_ctypes/libffi/configure b/Modules/_ctypes/libffi/configure -index 75f62a7..4d6c9f2 100755 ---- a/Modules/_ctypes/libffi/configure -+++ b/Modules/_ctypes/libffi/configure -@@ -17257,20 +17257,12 @@ case "$host" in - fi - ;; - -- i?86-*-* | x86_64-*-*) -- TARGETDIR=x86 -- if test $ac_cv_sizeof_size_t = 4; then -- case "$host" in -- *-gnux32) -- TARGET=X86_64 -- ;; -- *) -- TARGET=X86 -- ;; -- esac -- else -- TARGET=X86_64; -- fi -+ i?86-*-*) -+ TARGET=X86; TARGETDIR=x86 -+ ;; -+ -+ x86_64-*-*) -+ TARGET=X86_64; TARGETDIR=x86 - ;; - - ia64*-*-*) From 8ca02842ae20742b7a511611443fa50b65cb3876 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 11 Jan 2017 15:15:46 +0200 Subject: [PATCH 6/7] python: remove `011-do-not-prefer-ncursesw.patch` LEDE now provides libncursesw by default [even for libncurses]. No need to keep this patch around. Signed-off-by: Alexandru Ardelean --- .../patches/011-do-not-prefer-ncursesw.patch | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 lang/python/patches/011-do-not-prefer-ncursesw.patch diff --git a/lang/python/patches/011-do-not-prefer-ncursesw.patch b/lang/python/patches/011-do-not-prefer-ncursesw.patch deleted file mode 100644 index c5f323c43..000000000 --- a/lang/python/patches/011-do-not-prefer-ncursesw.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/setup.py b/setup.py -index 7868b7b..86b0119 100644 ---- a/setup.py -+++ b/setup.py -@@ -725,8 +725,8 @@ class PyBuildExt(build_ext): - # use the same library for the readline and curses modules. - if 'curses' in readline_termcap_library: - curses_library = readline_termcap_library -- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): -- curses_library = 'ncursesw' -+ #elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): -+ # curses_library = 'ncursesw' - elif self.compiler.find_library_file(lib_dirs, 'ncurses'): - curses_library = 'ncurses' - elif self.compiler.find_library_file(lib_dirs, 'curses'): From b5b6ef34f4b7dbdab32f3300b56f6daec5f78b91 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 11 Jan 2017 11:07:51 +0200 Subject: [PATCH 7/7] python: bump PKG_RELEASE to 3 Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index d854be50b..6307dc3a5 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -12,7 +12,7 @@ include ./files/python-version.mk PKG_NAME:=python PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)