From f5f8d83dcdb31a2e0d0948c576ca7e744b09520c Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Thu, 8 Jan 2015 12:43:34 +0200 Subject: [PATCH 1/5] python: change _PYTHON_HOST_PLATFORM to linux2 Signed-off-by: Alexandru Ardelean --- lang/python/files/python-package.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 19e0b9b61..c8cbcda57 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -98,7 +98,7 @@ define Build/Compile/PyMod CFLAGS="$(TARGET_CFLAGS)" \ CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PYTHON_INC_DIR)" \ LDFLAGS="$(TARGET_LDFLAGS) -lpython$(PYTHON_VERSION)" \ - _PYTHON_HOST_PLATFORM="linux-$(ARCH)" \ + _PYTHON_HOST_PLATFORM=linux2 \ __PYVENV_LAUNCHER__="/usr/bin/$(PYTHON)" \ $(3) \ , \ From 7123d31a0ba0e78bda08f5d6b659a9ea1a589060 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 11 Jan 2015 16:02:03 +0200 Subject: [PATCH 2/5] python: enable pip installation of pip on the host-side Python packs some pip installation script during the build, which looks like a better idea to use for the python-pip and/or python-setuptools packages. Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/python/Makefile b/lang/python/Makefile index 0bc6c440f..b02aebdaf 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -191,6 +191,7 @@ HOST_CONFIGURE_ARGS+= \ --without-pymalloc \ --with-threads \ --prefix=$(STAGING_DIR_HOST) \ + --with-ensurepip=upgrade \ CONFIG_SITE= \ OPT="$(HOST_CFLAGS)" From 11fba7e6bdd5a71e03b887c391989cc28c9489db Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 11 Jan 2015 17:08:02 +0200 Subject: [PATCH 3/5] python: remove libffi/host; we're not using it 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 b02aebdaf..d2b92d50b 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -28,7 +28,7 @@ HOST_BUILD_PARALLEL:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=libffi/host python/host +PKG_BUILD_DEPENDS:=python/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk From b474e60d6d6d7433ce1ba38a8c2ec7501216ff8b Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 11 Jan 2015 18:47:02 +0200 Subject: [PATCH 4/5] python: add patch to fix _ctypes build on certain X86_64 hosts Signed-off-by: Alexandru Ardelean --- .../150-fix-libffi-x86-64-configure.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lang/python/patches/150-fix-libffi-x86-64-configure.patch diff --git a/lang/python/patches/150-fix-libffi-x86-64-configure.patch b/lang/python/patches/150-fix-libffi-x86-64-configure.patch new file mode 100644 index 000000000..ea062a350 --- /dev/null +++ b/lang/python/patches/150-fix-libffi-x86-64-configure.patch @@ -0,0 +1,31 @@ +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 0394a1e2864afbc8cfcd134e78dc9291342c5c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szil=C3=A1rd=20Pfeiffer?= Date: Thu, 27 Nov 2014 23:19:40 +0100 Subject: [PATCH 5/5] python: Install .pc files from Python package. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Szilárd Pfeiffer Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index d2b92d50b..0c1be6de8 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -104,7 +104,7 @@ endef define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR)/mk/ - $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/ $(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/ $(CP) \ @@ -114,6 +114,11 @@ define Build/InstallDev $(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \ $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \ $(1)/usr/lib/ + $(CP) \ + $(STAGING_DIR_HOST)/lib/pkgconfig/python.pc \ + $(STAGING_DIR_HOST)/lib/pkgconfig/python2.pc \ + $(STAGING_DIR_HOST)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \ + $(1)/usr/lib/pkgconfig $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \ $(1)/usr/lib/python$(PYTHON_VERSION)/