From 7e6939bdc0a79e5efbcb0590a87c10be2ff78895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Thu, 2 Jul 2015 17:57:13 +0200 Subject: [PATCH 1/4] python: fix patch removing multiarch support for host python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch removing multiarch paths from build should be applied only when Python is built for target, but not for host. When the paths are removed during host build, host python throws some ugly errors when importing some hashlib modules. Also it reports that modules crypt and nis failed to build (tested on Ubuntu 14.04 host). Signed-off-by: Jan Čermák --- lang/python/Makefile | 2 +- .../patches/006-remove-debian-multiarch-support.patch | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index dec76e7f6..21221df5f 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -12,7 +12,7 @@ include ./files/python-package.mk PKG_NAME:=python PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION) diff --git a/lang/python/patches/006-remove-debian-multiarch-support.patch b/lang/python/patches/006-remove-debian-multiarch-support.patch index 52d52b94e..01aa924ab 100644 --- a/lang/python/patches/006-remove-debian-multiarch-support.patch +++ b/lang/python/patches/006-remove-debian-multiarch-support.patch @@ -1,12 +1,14 @@ diff --git a/setup.py b/setup.py -index 7868b7b..9ae0ef2 100644 +index 1d1ae72..511aed5 100644 --- a/setup.py +++ b/setup.py -@@ -444,7 +444,6 @@ class PyBuildExt(build_ext): +@@ -444,7 +444,8 @@ class PyBuildExt(build_ext): add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') if cross_compiling: self.add_gcc_paths() - self.add_multiarch_paths() ++ else: ++ self.add_multiarch_paths() # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. From 7b2c37067ba237e1c305e60f9a2a864bd1ee99d6 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 3 Aug 2015 08:01:14 +0200 Subject: [PATCH 2/4] python: add correct host expat Signed-off-by: Steven Barth --- lang/python/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/python/Makefile b/lang/python/Makefile index 21221df5f..4ed62277a 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -222,6 +222,7 @@ HOST_CONFIGURE_ARGS+= \ --without-cxx-main \ --without-pymalloc \ --with-threads \ + --with-system-expat=$(STAGING_DIR_HOST) \ --prefix=$(STAGING_DIR_HOST) \ --with-ensurepip=upgrade \ CONFIG_SITE= \ From a28067d30d056f68e0328f254127490ce6a85bfd Mon Sep 17 00:00:00 2001 From: Attila Lendvai Date: Sun, 27 Sep 2015 22:54:02 +0200 Subject: [PATCH 3/4] python: fix cross-compiling C++ modules. Signed-off-by: Attila Lendvai --- lang/python/files/python-package.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 4895b91a1..9b011602f 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -103,6 +103,7 @@ define Build/Compile/PyMod cd $(PKG_BUILD_DIR)/$(strip $(1)); \ CC="$(TARGET_CC)" \ CCSHARED="$(TARGET_CC) $(FPIC)" \ + CXX="$(TARGET_CXX)" \ LD="$(TARGET_CC)" \ LDSHARED="$(TARGET_CC) -shared" \ CFLAGS="$(TARGET_CFLAGS)" \ From c4ca3f0bf265825fd6e75b853fa453a34e02ab21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Mon, 23 Nov 2015 21:59:29 +0100 Subject: [PATCH 4/4] python: add missing host build dependency on expat/host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 94f87dc1, host build of Python depends on expat installed in host staging directory. However, pyexpat extension fails to build if expat was not built and installed to staging dir before - adding host build dependency should fix this. Signed-off-by: Jan Čermák --- lang/python/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index 4ed62277a..069be0f96 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -29,7 +29,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 +HOST_BUILD_DEPENDS:=bzip2/host expat/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk