From 2f55f2a7b559b98bd2bb804ab7b8a2445ad05ab5 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sat, 22 Dec 2018 22:16:52 +0800 Subject: [PATCH] python/python3: fix .dist-info missing for setuptools and pip Without .dist-info (similar to .egg-info), setuptools and pip are not discoverable by pkg_resources. Signed-off-by: Jeffery To --- lang/python/python-version.mk | 8 ++------ lang/python/python/files/python-package-pip.mk | 3 ++- lang/python/python/files/python-package-setuptools.mk | 3 ++- lang/python/python3-version.mk | 8 ++------ lang/python/python3/files/python3-package-pip.mk | 3 ++- lang/python/python3/files/python3-package-setuptools.mk | 3 ++- 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/lang/python/python-version.mk b/lang/python/python-version.mk index f413215115..b04f763f2e 100644 --- a/lang/python/python-version.mk +++ b/lang/python/python-version.mk @@ -8,12 +8,8 @@ PYTHON_VERSION:=2.7 PYTHON_VERSION_MICRO:=15 -PYTHON_SETUPTOOLS_PKG_RELEASE:=1 -PYTHON_PIP_PKG_RELEASE:=1 +PYTHON_SETUPTOOLS_PKG_RELEASE:=2 +PYTHON_PIP_PKG_RELEASE:=2 PYTHON_SETUPTOOLS_VERSION:=39.0.1 PYTHON_PIP_VERSION:=9.0.3 - -PYTHON_SETUPTOOLS_VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE) -PYTHON_PIP_VERSION:=$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE) - diff --git a/lang/python/python/files/python-package-pip.mk b/lang/python/python/files/python-package-pip.mk index a3934cc197..b082564646 100644 --- a/lang/python/python/files/python-package-pip.mk +++ b/lang/python/python/files/python-package-pip.mk @@ -8,7 +8,7 @@ define Package/python-pip $(call Package/python/Default) TITLE:=Python $(PYTHON_VERSION) pip module - VERSION:=$(PYTHON_PIP_VERSION) + VERSION:=$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE) DEPENDS:=+python +python-setuptools +python-pip-conf endef @@ -19,6 +19,7 @@ define PyPackage/python-pip/install $(CP) $(PKG_BUILD_DIR)/install-pip/bin/* $(1)/usr/bin $(CP) \ $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON_VERSION)/site-packages/pip \ + $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON_VERSION)/site-packages/pip-$(PYTHON_PIP_VERSION).dist-info \ $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages/ endef diff --git a/lang/python/python/files/python-package-setuptools.mk b/lang/python/python/files/python-package-setuptools.mk index c35fad8c5b..413ec7979a 100644 --- a/lang/python/python/files/python-package-setuptools.mk +++ b/lang/python/python/files/python-package-setuptools.mk @@ -8,7 +8,7 @@ define Package/python-setuptools $(call Package/python/Default) TITLE:=Python $(PYTHON_VERSION) setuptools module - VERSION:=$(PYTHON_SETUPTOOLS_VERSION) + VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE) DEPENDS:=+python endef @@ -20,6 +20,7 @@ define PyPackage/python-setuptools/install $(CP) \ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/setuptools \ + $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/setuptools-$(PYTHON_SETUPTOOLS_VERSION).dist-info \ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \ $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages endef diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index 60dcbccbcd..c999e4a5c7 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -12,12 +12,8 @@ PYTHON3_VERSION_MICRO:=1 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) -PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 -PYTHON3_PIP_PKG_RELEASE:=1 +PYTHON3_SETUPTOOLS_PKG_RELEASE:=2 +PYTHON3_PIP_PKG_RELEASE:=2 PYTHON3_SETUPTOOLS_VERSION:=39.0.1 PYTHON3_PIP_VERSION:=10.0.1 - -PYTHON3_SETUPTOOLS_VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE) -PYTHON3_PIP_VERSION:=$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE) - diff --git a/lang/python/python3/files/python3-package-pip.mk b/lang/python/python3/files/python3-package-pip.mk index ff9b5ac749..1aaeaf2ee0 100644 --- a/lang/python/python3/files/python3-package-pip.mk +++ b/lang/python/python3/files/python3-package-pip.mk @@ -8,7 +8,7 @@ define Package/python3-pip $(call Package/python3/Default) TITLE:=Python $(PYTHON3_VERSION) pip module - VERSION:=$(PYTHON3_PIP_VERSION) + VERSION:=$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE) DEPENDS:=+python3 +python3-setuptools +python-pip-conf endef @@ -19,6 +19,7 @@ define Package/python3-pip/install $(CP) $(PKG_BUILD_DIR)/install-pip/bin/pip3* $(1)/usr/bin $(CP) \ $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip \ + $(PKG_BUILD_DIR)/install-pip/lib/python$(PYTHON3_VERSION)/site-packages/pip-$(PYTHON3_PIP_VERSION).dist-info \ $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf endef diff --git a/lang/python/python3/files/python3-package-setuptools.mk b/lang/python/python3/files/python3-package-setuptools.mk index 684d3e64e1..c8415cbd93 100644 --- a/lang/python/python3/files/python3-package-setuptools.mk +++ b/lang/python/python3/files/python3-package-setuptools.mk @@ -8,7 +8,7 @@ define Package/python3-setuptools $(call Package/python3/Default) TITLE:=Python $(PYTHON3_VERSION) setuptools module - VERSION:=$(PYTHON3_SETUPTOOLS_VERSION) + VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE) DEPENDS:=+python3 endef @@ -21,6 +21,7 @@ define Py3Package/python3-setuptools/install $(CP) \ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \ + $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \ $(PKG_BUILD_DIR)/install-setuptools/lib/python$(PYTHON3_VERSION)/site-packages/easy_install.py \ $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -name __pycache__ | xargs rm -rf -- 2.30.2