From cbc39a176fc489e3dded67c7f32cbc5c56bafe46 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 9 Nov 2014 11:09:10 +0200 Subject: [PATCH 1/5] python: final switch Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index bbd0197fb..a92a31270 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -51,23 +51,23 @@ define Package/python/Default/description the development of higher quality, more maintainable code. endef -define Package/python +define Package/python-base $(call Package/python/Default) + TITLE:=Python $(PYTHON_VERSION) interpreter DEPENDS:=+libpthread +zlib +libffi +libopenssl endef -define Package/python/description +define Package/python-base/description This package contains only the interpreter and the bare minimum for the interpreter to start. endef -define Package/python-full +define Package/python $(call Package/python/Default) - TITLE:=Full install (minus a few libs) - DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libncursesw + DEPENDS:=+python-base +libncursesw endef -define Package/python-full/description +define Package/python/description This package contains the (almost) full Python install. endef @@ -110,7 +110,7 @@ define Build/InstallDev $(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/ endef -define PyPackage/python/filespec +define PyPackage/python-base/filespec +|/usr/bin/python$(PYTHON_VERSION) +|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py +|/usr/lib/python$(PYTHON_VERSION)/_sysconfigdata.py @@ -134,7 +134,7 @@ define PyPackage/python/filespec +|/usr/lib/python$(PYTHON_VERSION)/warnings.py endef -define PyPackage/python-full/filespec +define PyPackage/python/filespec +|/usr/lib/python$(PYTHON_VERSION) -|/usr/lib/python$(PYTHON_VERSION)/config -|/usr/lib/python$(PYTHON_VERSION)/distutils @@ -149,7 +149,7 @@ define PyPackage/python-full/filespec -|/usr/lib/python$(PYTHON_VERSION)/*/tests endef -define PyPackage/python/install +define PyPackage/python-base/install $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python2 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/ @@ -169,8 +169,8 @@ endef $(eval $(call HostBuild)) +$(eval $(call PyPackage,python-base)) $(eval $(call PyPackage,python)) -$(eval $(call PyPackage,python-full)) +$(eval $(call BuildPackage,python-base)) $(eval $(call BuildPackage,python)) -$(eval $(call BuildPackage,python-full)) From efcfca96315443094d699ede0c2629b2a1feb0bf Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 9 Nov 2014 12:36:48 +0200 Subject: [PATCH 2/5] python: add lib deps Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index a92a31270..d7691a7dc 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:=python/host +PKG_BUILD_DEPENDS:=libffi/host python/host include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -64,7 +64,7 @@ endef define Package/python $(call Package/python/Default) - DEPENDS:=+python-base +libncursesw + DEPENDS:=+python-base +libncursesw +libbz2 +libgdbm +libreadline +libsqlite3 +libexpat +libdb47 endef define Package/python/description From dd4cca5d262965aa2ae81e54ae844def407e46f5 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 9 Nov 2014 13:10:12 +0200 Subject: [PATCH 3/5] python: add OPT and CONFIG_SITE vars to HOST_CONFIGURE_ARGS Fixes some build issues. Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index d7691a7dc..058197688 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -159,7 +159,9 @@ HOST_CONFIGURE_ARGS+= \ --without-cxx-main \ --without-pymalloc \ --with-threads \ - --prefix=$(STAGING_DIR_HOST) + --prefix=$(STAGING_DIR_HOST) \ + CONFIG_SITE= \ + OPT="$(HOST_CFLAGS)" define Host/Install $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ From 4f0f05f92bc89894b1e0cddfecc561539ba962fc Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 9 Nov 2014 17:56:45 +0200 Subject: [PATCH 4/5] python: add some Build/InstallDev rules back Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lang/python/Makefile b/lang/python/Makefile index 058197688..38e9267f9 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -107,7 +107,19 @@ Hooks/Configure/Pre+=\ define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR)/mk/ + $(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/ $(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \ + $(1)/usr/include/ + $(CP) \ + $(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \ + $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \ + $(1)/usr/lib/python$(PYTHON_VERSION)/ endef define PyPackage/python-base/filespec From a9ba2161bd391e544d88705eab956054432d53e8 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Sun, 9 Nov 2014 19:54:01 +0200 Subject: [PATCH 5/5] python: remove readline.so for now Some symbols are not found (tgetnum and BC). Looks like the termcap lib, which should be in libncurses(w) but maybe some build param would be required. Signed-off-by: Alexandru Ardelean --- lang/python/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/python/Makefile b/lang/python/Makefile index 38e9267f9..bab6ce335 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -64,7 +64,7 @@ endef define Package/python $(call Package/python/Default) - DEPENDS:=+python-base +libncursesw +libbz2 +libgdbm +libreadline +libsqlite3 +libexpat +libdb47 + DEPENDS:=+python-base +libncursesw +libbz2 +libgdbm +libsqlite3 +libexpat +libdb47 endef define Package/python/description @@ -159,6 +159,7 @@ define PyPackage/python/filespec -|/usr/lib/python$(PYTHON_VERSION)/webbrowser.py -|/usr/lib/python$(PYTHON_VERSION)/*/test -|/usr/lib/python$(PYTHON_VERSION)/*/tests +-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so endef define PyPackage/python-base/install