summaryrefslogtreecommitdiff
path: root/lang/python/python3/Makefile
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2023-05-18 20:38:09 +0800
committerJeffery To <jeffery.to@gmail.com>2023-05-26 22:06:24 +0800
commitb4975f8bbb9f61a2a170dc1acd6cabe2b7e9f93c (patch)
treed36eef267fc9740d0f3027f10f79ae006e366af3 /lang/python/python3/Makefile
parenteee273507b868ad5f6f7e744d513c85330967906 (diff)
python3: Split setuptools into separate source package
Packaging setuptools from a separate source package allows it to stay updated with upstream. Host setuptools will remain installed as part of python3. Host setuptools is used in a much more controlled way and so is less critical for it to track upstream. setuptools was in a separate source package that was removed in a53d0c5a403d1669e2cf6c59c2be6a9d3ed633a0; this work is not based on that earlier package. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/python3/Makefile')
-rw-r--r--lang/python/python3/Makefile39
1 files changed, 2 insertions, 37 deletions
diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile
index b478f5b6c..d2ef977a2 100644
--- a/lang/python/python3/Makefile
+++ b/lang/python/python3/Makefile
@@ -41,10 +41,6 @@ PKG_BUILD_FLAGS:=no-lto
PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
-PKG_CONFIG_DEPENDS:= \
- CONFIG_PACKAGE_python3-pkg-resources \
- CONFIG_PACKAGE_python3-setuptools
-
PKG_BUILD_DEPENDS:=bluez python3/host python-build/host python-installer/host python-wheel/host
HOST_BUILD_DEPENDS:=bzip2/host libffi/host
@@ -187,38 +183,6 @@ CONFIGURE_ARGS += \
$(if $(CONFIG_IPV6),--enable-ipv6) \
$(if $(findstring mips,$(CONFIG_ARCH)),,--with-lto)
-ifdef CONFIG_PACKAGE_python3-setuptools
-PYTHON3_SETUPTOOLS_BUILD:=1
-endif
-
-ifdef CONFIG_PACKAGE_python3-pkg-resources
-PYTHON3_SETUPTOOLS_BUILD:=1
-endif
-
-ifeq ($(PYTHON3_SETUPTOOLS_BUILD),1)
-define Build/Compile/python3-setuptools
- $(HOST_PYTHON3_PIP_VARS) \
- $(HOST_PYTHON3_PIP) \
- install \
- --ignore-installed \
- --progress-bar off \
- --root=$(PKG_BUILD_DIR)/install-setuptools \
- --prefix=/usr \
- $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)-py3-none-any.whl
- $(call PatchDir,$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-setuptools,)
-endef
-else
-define Build/Compile/python3-setuptools
- ls $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)-py3-none-any.whl
-endef
-endif # CONFIG_PACKAGE_python3-setuptools
-
-define Build/Compile
- $(call Build/Compile/Default)
- # Use host pip to install python-setuptools
- $(call Build/Compile/python3-setuptools)
-endef
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
$(INSTALL_DIR) $(2)/bin
@@ -347,6 +311,7 @@ HOST_CONFIGURE_ARGS += \
define Host/Configure
$(SED) 's/^ENABLE_USER_SITE = None$$$$/ENABLE_USER_SITE = False/' $(HOST_BUILD_DIR)/Lib/site.py
$(call Host/Configure/Default)
+ ls $(HOST_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)-py3-none-any.whl
ls $(HOST_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py3-none-any.whl
endef
@@ -368,7 +333,7 @@ define Host/Install
)
$(call Host/Install/Default)
$(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
- $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-setuptools,)
+ $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-host-setuptools,)
touch $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
)
$(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)),,