Merge pull request #21194 from 1715173329/pgr
authorAlexandru Ardelean <alex@shruggie.ro>
Sat, 27 May 2023 18:17:35 +0000 (21:17 +0300)
committerGitHub <noreply@github.com>
Sat, 27 May 2023 18:17:35 +0000 (21:17 +0300)
python-greenlet: Update to 2.0.2

27 files changed:
lang/python/numpy/Makefile
lang/python/numpy/patches/001-unpin-build-dependencies.patch
lang/python/python-build/Makefile
lang/python/python-flit-scm/Makefile
lang/python/python-hatch-fancy-pypi-readme/Makefile
lang/python/python-hatchling/Makefile
lang/python/python-pip-conf/Makefile [deleted file]
lang/python/python-pip-conf/files/pip.conf [deleted file]
lang/python/python-pip/Makefile [new file with mode: 0644]
lang/python/python-pip/files/pip.conf [new file with mode: 0644]
lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch [new file with mode: 0644]
lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch [new file with mode: 0644]
lang/python/python-pip/patches/003-disable-pip-version-check.patch [new file with mode: 0644]
lang/python/python-pyproject-hooks/Makefile
lang/python/python-pytest/Makefile
lang/python/python-setuptools-scm/Makefile
lang/python/python-setuptools/Makefile [new file with mode: 0644]
lang/python/python-tomli/Makefile [deleted file]
lang/python/python3/Makefile
lang/python/python3/files/python3-package-pip.mk [deleted file]
lang/python/python3/files/python3-package-pkg-resources.mk [deleted file]
lang/python/python3/files/python3-package-setuptools.mk [deleted file]
lang/python/python3/files/python3-package-venv.mk [new file with mode: 0644]
lang/python/python3/patches-host-pip/.gitkeep [new file with mode: 0644]
lang/python/python3/patches-host-setuptools/.gitkeep [new file with mode: 0644]
lang/python/python3/patches-pip/001-pep517-pyc-fix.patch [deleted file]
lang/python/python3/patches-setuptools/.placeholder [deleted file]

index d7e485d79ce4db1abdf275dfc9d20085683599ff..bb5b898d1b7086d72a8be00ad8bd3554c6085d87 100644 (file)
@@ -6,11 +6,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=numpy
-PKG_VERSION:=1.23.3
-PKG_RELEASE:=5
+PKG_VERSION:=1.24.3
+PKG_RELEASE:=1
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd
+PKG_HASH:=ab344f1bf21f140adab8e47fdbc7c35a477dc01408791f8ba00d018dd0bc5155
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
@@ -54,6 +54,12 @@ config NUMPY_OPENBLAS_SUPPORT
 endmenu
 endef
 
+ifeq ($(ARCH),x86_64)
+# FIXME: temporary fix for x86_64 with GCC 13 + musl;
+#        numpy does not detect this compiler extension, so we just enable it
+TARGET_CFLAGS += -mavx512f
+endif
+
 define Build/Prepare/numpy-sitecfg
        echo "[DEFAULT]"                                 >  $(PKG_BUILD_DIR)/site.cfg
        echo "library_dirs = $(STAGING_DIR)/usr/lib"     >> $(PKG_BUILD_DIR)/site.cfg
index c167f0729368fbe4c1f512cf08381472aea312ff..1606762b0b93f7fbc571b912ffeff31650a0717f 100644 (file)
@@ -1,9 +1,9 @@
 --- a/pyproject.toml
 +++ b/pyproject.toml
-@@ -2,8 +2,8 @@
+@@ -1,8 +1,8 @@
+ [build-system]
  # Minimum requirements for the build system to execute.
  requires = [
-     "packaging==20.5; platform_machine=='arm64'",  # macos M1
 -    "setuptools==59.2.0",
 -    "wheel==0.37.0",
 +    "setuptools>=59.2.0",
index e60023725e4b307a5ef439d25ba41985474c35bb..e93025a6319c9b58d65d0e1f7376101e7312a0cc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-build
 PKG_VERSION:=0.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=build
 PKG_HASH:=d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269
@@ -24,8 +24,7 @@ HOST_BUILD_DEPENDS:= \
        python-installer/host \
        python-flit-core/host \
        python-packaging/host \
-       python-pyproject-hooks/host \
-       python-tomli/host
+       python-pyproject-hooks/host
 
 PYTHON3_HOST_BUILD_VARS:=PYTHONPATH=src
 
index 57660f79bb28e085ce210ce83593338f697f32c0..87188fd743af0ea491e92a84d749ee5e7d640427 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-flit-scm
 PKG_VERSION:=1.7.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=flit-scm
 PYPI_SOURCE_NAME:=flit_scm
@@ -25,8 +25,7 @@ HOST_BUILD_DEPENDS:= \
        python-build/host \
        python-installer/host \
        python-flit-core/host \
-       python-setuptools-scm/host \
-       python-tomli/host
+       python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
@@ -40,7 +39,7 @@ define Package/python3-flit-scm
   SUBMENU:=Python
   TITLE:=A PEP 518 build backend that uses setuptools_scm and flit
   URL:=https://gitlab.com/WillDaSilva/flit_scm
-  DEPENDS:=+python3-light +python3-flit-core +python3-setuptools-scm +python3-tomli
+  DEPENDS:=+python3-light +python3-flit-core +python3-setuptools-scm
   BUILDONLY:=1
 endef
 
index 4a2ab871d38816a4ed09fa487222d35de3502b02..24e27be36c0daf097f4bdc6f342136fe8544a9ba 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-hatch-fancy-pypi-readme
 PKG_VERSION:=22.8.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=hatch-fancy-pypi-readme
 PYPI_SOURCE_NAME:=hatch_fancy_pypi_readme
@@ -20,12 +20,7 @@ PKG_LICENSE_FILES:=LICENSE.txt
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 PKG_HOST_ONLY:=1
-HOST_BUILD_DEPENDS:= \
-       python3/host \
-       python-build/host \
-       python-installer/host \
-       python-hatchling/host \
-       python-tomli/host
+HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-hatchling/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
@@ -39,7 +34,7 @@ define Package/python3-hatch-fancy-pypi-readme
   SUBMENU:=Python
   TITLE:=Fancy PyPI READMEs with Hatch
   URL:=https://github.com/hynek/hatch-fancy-pypi-readme
-  DEPENDS:=+python3-light +python3-hatchling +python3-tomli
+  DEPENDS:=+python3-light +python3-hatchling
   BUILDONLY:=1
 endef
 
index 76ca4fc1a14686c0989c2b0e6ea0507321264c24..6bc1b8fbcbe5cfac7a465039fc3bbf95778e6ffa 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-hatchling
 PKG_VERSION:=1.17.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=hatchling
 PKG_HASH:=b1244db3f45b4ef5a00106a46612da107cdfaf85f1580b8e1c059fefc98b0930
@@ -27,7 +27,6 @@ HOST_BUILD_DEPENDS:= \
        python-packaging/host \
        python-pathspec/host \
        python-pluggy/host \
-       python-tomli/host \
        python-trove-classifiers/host
 
 include ../pypi.mk
@@ -49,7 +48,6 @@ define Package/python3-hatchling
       +python3-packaging \
       +python3-pathspec \
       +python3-pluggy \
-      +python3-tomli \
       +python3-trove-classifiers
   BUILDONLY:=1
 endef
diff --git a/lang/python/python-pip-conf/Makefile b/lang/python/python-pip-conf/Makefile
deleted file mode 100644 (file)
index b8ef7f6..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-pip-conf
-PKG_VERSION:=0.1
-PKG_RELEASE:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/python-pip-conf
-  SUBMENU:=Python
-  SECTION:=lang
-  CATEGORY:=Languages
-  TITLE:=Configuration file for pip/pip3
-  URL:=https://pip.pypa.io
-  MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
-endef
-
-define Package/python-pip-conf/description
- Configuration file for pip/pip3
-endef
-
-Build/Compile:=
-
-define Package/python-pip-conf/install
-       $(INSTALL_DIR) $(1)/etc
-       $(CP) ./files/pip.conf $(1)/etc
-endef
-
-$(eval $(call BuildPackage,python-pip-conf))
diff --git a/lang/python/python-pip-conf/files/pip.conf b/lang/python/python-pip-conf/files/pip.conf
deleted file mode 100644 (file)
index 89339e9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[global]
-cache-dir=/tmp/.cache
-log-file=/tmp/pip-log.txt
diff --git a/lang/python/python-pip/Makefile b/lang/python/python-pip/Makefile
new file mode 100644 (file)
index 0000000..97a5326
--- /dev/null
@@ -0,0 +1,56 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-pip
+PKG_VERSION:=23.1.2
+PKG_RELEASE:=1
+
+PYPI_NAME:=pip
+PKG_HASH:=0e7c86f486935893c708287b30bd050a36ac827ec7fe5e43fe7cb198dd835fba
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+CPE_ID:=cpe:/a:python:pip
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-pip
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=PyPA recommended tool for installing Python packages
+  URL:=https://pip.pypa.io/
+  DEPENDS:=+python3
+endef
+
+define Package/python3-pip/description
+pip is the package installer for Python. You can use pip to install
+packages from the Python Package Index and other indexes.
+endef
+
+define Package/python3-pip/conffiles
+/etc/pip.conf
+endef
+
+define Py3Package/python3-pip/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pip$(PYTHON3_VERSION) $(1)/usr/bin/
+       $(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip3
+       $(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip
+
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DATA) ./files/pip.conf $(1)/etc/
+endef
+
+$(eval $(call Py3Package,python3-pip))
+$(eval $(call BuildPackage,python3-pip))
+$(eval $(call BuildPackage,python3-pip-src))
diff --git a/lang/python/python-pip/files/pip.conf b/lang/python/python-pip/files/pip.conf
new file mode 100644 (file)
index 0000000..0890081
--- /dev/null
@@ -0,0 +1,2 @@
+[global]
+cache-dir = /var/cache/pip
diff --git a/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch b/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch
new file mode 100644 (file)
index 0000000..27681c1
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py
++++ b/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py
+@@ -11,8 +11,8 @@ try:
+ except AttributeError:
+     # Python 3.8 compatibility
+     def _in_proc_script_path():
+-        return resources.path(__package__, '_in_process.py')
++        return resources.path(__package__, '_in_process.pyc')
+ else:
+     def _in_proc_script_path():
+         return resources.as_file(
+-            resources.files(__package__).joinpath('_in_process.py'))
++            resources.files(__package__).joinpath('_in_process.pyc'))
diff --git a/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch b/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch
new file mode 100644 (file)
index 0000000..4616fe0
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/src/pip/_internal/build_env.py
++++ b/src/pip/_internal/build_env.py
+@@ -54,7 +54,7 @@ def get_runnable_pip() -> str:
+         # case, we can use that directly.
+         return str(source)
+-    return os.fsdecode(source / "__pip-runner__.py")
++    return os.fsdecode(source / "__pip-runner__.pyc")
+ def _get_system_sitepackages() -> Set[str]:
diff --git a/lang/python/python-pip/patches/003-disable-pip-version-check.patch b/lang/python/python-pip/patches/003-disable-pip-version-check.patch
new file mode 100644 (file)
index 0000000..87a8178
--- /dev/null
@@ -0,0 +1,20 @@
+From: Barry Warsaw <barry@python.org>
+Date: Fri, 18 Nov 2016 17:07:47 -0500
+Subject: Set --disable-pip-version-check=True by default.
+
+Patch-Name: disable-pip-version-check.patch
+---
+ src/pip/_internal/cli/cmdoptions.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/pip/_internal/cli/cmdoptions.py
++++ b/src/pip/_internal/cli/cmdoptions.py
+@@ -892,7 +892,7 @@ disable_pip_version_check: Callable[...,
+     "--disable-pip-version-check",
+     dest="disable_pip_version_check",
+     action="store_true",
+-    default=False,
++    default=True,
+     help="Don't periodically check PyPI to determine whether a new version "
+     "of pip is available for download. Implied with --no-index.",
+ )
index 50b3780ede5fdcc0895e8c6bac713480c601de4d..316a8026dbd8ee7e684484234e084627d767f596 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pyproject-hooks
 PKG_VERSION:=1.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pyproject_hooks
 PKG_HASH:=f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5
@@ -19,7 +19,7 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
 PKG_HOST_ONLY:=1
-HOST_BUILD_DEPENDS:=python3/host python-flit-core/host python-installer/host python-tomli/host
+HOST_BUILD_DEPENDS:=python3/host python-flit-core/host python-installer/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index dd978d248f8c884fc43f30a954095aec14181159..473192c312266f252412b96a57d50b1e7941f8c6 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest
 PKG_VERSION:=7.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pytest
 PKG_HASH:=58ecc27ebf0ea643ebfdf7fb1249335da761a00c9f955bcd922349bcb68ee57d
@@ -34,7 +34,6 @@ define Package/python3-pytest
        +python3 \
        +python3-pluggy \
        +python3-packaging \
-       +python3-tomli \
        +python3-exceptiongroup \
        +python3-iniconfig
 endef
index c9a0ec78d96100868e6e4ab53d7425f6f928b60d..5e197a57f9af6e2dff5632de522b139b8e803ac1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-setuptools-scm
 PKG_VERSION:=7.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=setuptools-scm
 PYPI_SOURCE_NAME:=setuptools_scm
@@ -26,7 +26,6 @@ HOST_BUILD_DEPENDS:= \
        python-installer/host \
        python-wheel/host \
        python-packaging/host \
-       python-tomli/host \
        python-typing-extensions/host
 
 include ../pypi.mk
@@ -46,7 +45,6 @@ define Package/python3-setuptools-scm
       +python3-logging \
       +python3-packaging \
       +python3-setuptools \
-      +python3-tomli \
       +python3-typing-extensions
   BUILDONLY:=1
 endef
diff --git a/lang/python/python-setuptools/Makefile b/lang/python/python-setuptools/Makefile
new file mode 100644 (file)
index 0000000..fa6ec74
--- /dev/null
@@ -0,0 +1,82 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-setuptools
+PKG_VERSION:=67.8.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=setuptools
+PKG_HASH:=62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+CPE_ID:=cpe:/a:python:setuptools
+
+include ../pypi.mk
+include $(INCLUDE_DIR)/package.mk
+include ../python3-package.mk
+
+define Package/python3-setuptools/Default
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  URL:=https://github.com/pypa/setuptools
+endef
+
+define Package/python3-pkg-resources
+$(call Package/python3-setuptools/Default)
+  TITLE:=Package resource API
+  DEPENDS:=+python3-light +python3-email +python3-logging +python3-urllib
+endef
+
+define Package/python3-setuptools
+$(call Package/python3-setuptools/Default)
+  TITLE:=Fully-featured library to package Python projects
+  DEPENDS:=+python3 +python3-pkg-resources
+endef
+
+define Package/python3-setuptools/description/Default
+Setuptools is a fully-featured, actively-maintained, and stable library
+designed to facilitate packaging Python projects.
+
+It helps developers to easily share reusable code (in the form of a
+library) and programs (e.g., CLI/GUI tools implemented in Python), that
+can be installed with pip and uploaded to PyPI.
+endef
+
+define Package/python3-pkg-resources/description
+$(call Package/python3-setuptools/description/Default)
+
+This is the pkg_resources module of setuptools.
+endef
+
+define Package/python3-setuptools/description
+$(call Package/python3-setuptools/description/Default)
+
+This is the main setuptools module.
+endef
+
+define Py3Package/python3-pkg-resources/filespec
++|$(PYTHON3_PKG_DIR)/pkg_resources
+endef
+
+define Py3Package/python3-setuptools/filespec
++|$(PYTHON3_PKG_DIR)
+-|$(PYTHON3_PKG_DIR)/pkg_resources
+endef
+
+$(eval $(call Py3Package,python3-pkg-resources))
+$(eval $(call Py3Package,python3-setuptools))
+
+$(eval $(call BuildPackage,python3-pkg-resources))
+$(eval $(call BuildPackage,python3-setuptools))
+
+$(eval $(call BuildPackage,python3-pkg-resources-src))
+$(eval $(call BuildPackage,python3-setuptools-src))
diff --git a/lang/python/python-tomli/Makefile b/lang/python/python-tomli/Makefile
deleted file mode 100644 (file)
index db615e3..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright (C) 2023 Jeffery To
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=python-tomli
-PKG_VERSION:=2.0.1
-PKG_RELEASE:=1
-
-PYPI_NAME:=tomli
-PKG_HASH:=de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
-
-PKG_LICENSE:=MIT
-PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
-
-PKG_HOST_ONLY:=1
-HOST_BUILD_DEPENDS:=python3/host python-flit-core/host python-installer/host
-
-include ../pypi.mk
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-include ../python3-package.mk
-include ../python3-host-build.mk
-
-define Package/python3-tomli
-  SECTION:=lang
-  CATEGORY:=Languages
-  SUBMENU:=Python
-  TITLE:=A lil' TOML parser
-  URL:=https://github.com/hukkin/tomli
-  DEPENDS:=+python3-light
-  BUILDONLY:=1
-endef
-
-define Package/python3-tomli/description
-Tomli is a Python library for parsing TOML. Tomli is fully compatible
-with TOML v1.0.0.
-endef
-
-Host/Compile=$(Py3Host/Compile/Bootstrap)
-
-$(eval $(call Py3Package,python3-tomli))
-$(eval $(call BuildPackage,python3-tomli))
-$(eval $(call BuildPackage,python3-tomli-src))
-$(eval $(call HostBuild))
index 020d88a6ec3113226719bd2e390e316d4414e4e8..d2ef977a22c170fb87c64278ceeba39e05b82f8e 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 include ../python3-version.mk
 
 PKG_NAME:=python3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -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 CONFIG_PACKAGE_python3-pip
-
 PKG_BUILD_DEPENDS:=bluez python3/host python-build/host python-installer/host python-wheel/host
 HOST_BUILD_DEPENDS:=bzip2/host libffi/host
 
@@ -187,57 +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
-
-ifdef CONFIG_PACKAGE_python3-pip
-define Build/Compile/python3-pip
-       $(HOST_PYTHON3_PIP_VARS) \
-       $(HOST_PYTHON3_PIP) \
-               install \
-               --ignore-installed \
-               --progress-bar off \
-               --root=$(PKG_BUILD_DIR)/install-pip \
-               --prefix=/usr \
-               $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py3-none-any.whl
-       $(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-pip,)
-endef
-else
-define Build/Compile/python3-pip
-       ls $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py3-none-any.whl
-endef
-endif # CONFIG_PACKAGE_python3-pip
-
-define Build/Compile
-       $(call Build/Compile/Default)
-       # Use host pip to install python-setuptools
-       $(call Build/Compile/python3-setuptools)
-       $(call Build/Compile/python3-pip)
-endef
-
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
        $(INSTALL_DIR) $(2)/bin
@@ -366,6 +311,8 @@ 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
 
 define Host/Install
@@ -386,11 +333,11 @@ 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)),,
-               $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-pip,)
+               $(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-host-pip,)
                touch $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)
        )
 endef
diff --git a/lang/python/python3/files/python3-package-pip.mk b/lang/python/python3/files/python3-package-pip.mk
deleted file mode 100644 (file)
index 61ea480..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python3-pip
-$(call Package/python3/Default)
-  TITLE:=Python $(PYTHON3_VERSION) pip module
-  VERSION:=$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)
-  LICENSE:=MIT
-  LICENSE_FILES:=LICENSE.txt
-#  CPE_ID:=cpe:/a:python:pip # not currently handled this way by uscan
-  DEPENDS:=+python3 +python3-setuptools +python-pip-conf
-endef
-
-define Py3Package/python3-pip/install
-       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       $(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/pip$(PYTHON3_VERSION) $(1)/usr/bin
-       $(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip3
-       $(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip
-       $(CP) \
-               $(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip \
-               $(PKG_BUILD_DIR)/install-pip/usr/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/ -path '*/__pycache__/*' -delete
-       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
-endef
-
-$(eval $(call Py3BasePackage,python3-pip, \
-       /usr/lib/python$(PYTHON3_VERSION)/ensurepip \
-       , \
-       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
-))
diff --git a/lang/python/python3/files/python3-package-pkg-resources.mk b/lang/python/python3/files/python3-package-pkg-resources.mk
deleted file mode 100644 (file)
index 592fe2c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2019 Alexandru Ardelean <ardeleanalex@gmail.com>
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python3-pkg-resources
-$(call Package/python3/Default)
-  TITLE:=Python $(PYTHON3_VERSION) pkg_resources module (part of setuptools)
-  VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
-  LICENSE:=MIT
-  LICENSE_FILES:=LICENSE
-#  CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
-  DEPENDS:=+python3
-endef
-
-define Py3Package/python3-pkg-resources/install
-       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       $(CP) \
-               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/pkg_resources \
-               $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
-       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
-endef
-
-$(eval $(call Py3BasePackage,python3-pkg-resources, \
-       , \
-       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
-))
diff --git a/lang/python/python3/files/python3-package-setuptools.mk b/lang/python/python3/files/python3-package-setuptools.mk
deleted file mode 100644 (file)
index 3b7c1ca..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Copyright (C) 2017 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Package/python3-setuptools
-$(call Package/python3/Default)
-  TITLE:=Python $(PYTHON3_VERSION) setuptools module
-  VERSION:=$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
-  LICENSE:=MIT
-  LICENSE_FILES:=LICENSE
-#  CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
-  DEPENDS:=+python3 +python3-pkg-resources
-endef
-
-define Py3Package/python3-setuptools/install
-       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       $(CP) \
-               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
-               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
-               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/_distutils_hack \
-               $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
-       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
-       find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete
-endef
-
-$(eval $(call Py3BasePackage,python3-setuptools, \
-       , \
-       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
-))
diff --git a/lang/python/python3/files/python3-package-venv.mk b/lang/python/python3/files/python3-package-venv.mk
new file mode 100644 (file)
index 0000000..b2ddcab
--- /dev/null
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2023 Jeffery To
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Package/python3-venv
+$(call Package/python3/Default)
+  TITLE:=Python $(PYTHON3_VERSION) venv module
+  DEPENDS:=+python3
+endef
+
+$(eval $(call Py3BasePackage,python3-venv, \
+       /usr/lib/python$(PYTHON3_VERSION)/ensurepip \
+       /usr/lib/python$(PYTHON3_VERSION)/venv \
+       , \
+       DO_NOT_ADD_TO_PACKAGE_DEPENDS \
+))
diff --git a/lang/python/python3/patches-host-pip/.gitkeep b/lang/python/python3/patches-host-pip/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lang/python/python3/patches-host-setuptools/.gitkeep b/lang/python/python3/patches-host-setuptools/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch b/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch
deleted file mode 100644 (file)
index df5f90c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/pip/_vendor/pep517/in_process/__init__.py b/pip/_vendor/pep517/in_process/__init__.py
-index 281a356cfe26..77acbfc2670b 100644
---- a/pip/_vendor/pep517/in_process/__init__.py
-+++ b/pip/_vendor/pep517/in_process/__init__.py
-@@ -14,13 +14,21 @@ try:
-     except AttributeError:
-         # Python 3.8 compatibility
-         def _in_proc_script_path():
--            return resources.path(__package__, '_in_process.py')
-+            if resources.is_resource(__package__, '_in_process.py'):
-+                return resources.path(__package__, '_in_process.py')
-+            return resources.path(__package__, '_in_process.pyc')
-     else:
-         def _in_proc_script_path():
-+            if resources.files(__package__).joinpath('_in_process.py').is_file():
-+                return resources.as_file(
-+                    resources.files(__package__).joinpath('_in_process.py'))
-             return resources.as_file(
--                resources.files(__package__).joinpath('_in_process.py'))
-+                resources.files(__package__).joinpath('_in_process.pyc'))
- except ImportError:
-     # Python 3.6 compatibility
-     @contextmanager
-     def _in_proc_script_path():
--        yield pjoin(dirname(abspath(__file__)), '_in_process.py')
-+        _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py')
-+        if not os.path.isfile(_in_proc_script):
-+            _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc')
-+        yield _in_proc_script
diff --git a/lang/python/python3/patches-setuptools/.placeholder b/lang/python/python3/patches-setuptools/.placeholder
deleted file mode 100644 (file)
index e69de29..0000000