python-setuptools-scm: Add new host-only package
authorJeffery To <jeffery.to@gmail.com>
Fri, 17 Feb 2023 00:49:36 +0000 (08:49 +0800)
committerJeffery To <jeffery.to@gmail.com>
Fri, 31 Mar 2023 05:06:35 +0000 (13:06 +0800)
The host build replaces the use of the host pip requirements file. This
also updates the dependants of setuptools-scm to depend on the host
build.

This also removes the toml host pip requirements file as toml is not
used by any other package.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
18 files changed:
lang/python/host-pip-requirements/setuptools-scm.txt [deleted file]
lang/python/host-pip-requirements/toml.txt [deleted file]
lang/python/python-apipkg/Makefile
lang/python/python-bidict/Makefile
lang/python/python-dateutil/Makefile
lang/python/python-execnet/Makefile
lang/python/python-iniconfig/Makefile
lang/python/python-jsonschema/Makefile
lang/python/python-pluggy/Makefile
lang/python/python-psutil/Makefile
lang/python/python-py/Makefile
lang/python/python-pytest-forked/Makefile
lang/python/python-pytest-xdist/Makefile
lang/python/python-pytest/Makefile
lang/python/python-setuptools-scm/Makefile [new file with mode: 0644]
lang/python/python-zipp/Makefile
net/onionshare-cli/Makefile
utils/apparmor/Makefile

diff --git a/lang/python/host-pip-requirements/setuptools-scm.txt b/lang/python/host-pip-requirements/setuptools-scm.txt
deleted file mode 100644 (file)
index 83b57e1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-setuptools-scm==6.0.1 --hash=sha256:d1925a69cb07e9b29416a275b9fadb009a23c148ace905b2fb220649a6c18e92
diff --git a/lang/python/host-pip-requirements/toml.txt b/lang/python/host-pip-requirements/toml.txt
deleted file mode 100644 (file)
index 108bf10..0000000
+++ /dev/null
@@ -1 +0,0 @@
-toml==0.10.2 --hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f
index 2e905a8932190d5fc5cb9dfdba0f903110227d1c..b33781831217885c9d267e5be573d2713b7b4a1e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-apipkg
 PKG_VERSION:=1.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PYPI_NAME:=apipkg
 PKG_HASH:=37228cda29411948b422fae072f57e31d3396d2ee1c9783775980ee9c9990af6
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index b6735b82fa7289eecfd1960024b8aff7f44bfa14..f95eb07e98c1d9ef576bac7183d1a95956b02f7e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-bidict
 PKG_VERSION:=0.21.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=bidict
 PKG_HASH:=4fa46f7ff96dc244abfc437383d987404ae861df797e2fd5b190e233c302be09
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MPL-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 394a307b6fd29708b2ea5b3722e2e34db27a5142..57e8a95aa84344c2957cb3ef2246a5c40be76612 100644 (file)
@@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-dateutil
 PKG_VERSION:=2.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-2-Clause
 
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 1b45788d4746fc185e33a5aea3b1e7e1b17a44cc..b82b4fd9f6d970834d0deda6a286cd2fde4f346e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-execnet
 PKG_VERSION:=1.8.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=execnet
 PKG_HASH:=b73c5565e517f24b62dea8a5ceac178c661c4309d3aa0c3e420856c072c411b4
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 5d5da76172f9e23406a846ae8f4763b0dba93c6c..98cd0cd7a0d4c2bd97d27af6372ace111946bb73 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-iniconfig
 PKG_VERSION:=1.1.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=iniconfig
 PKG_HASH:=bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 4167ef29c041a3bd6cd29259fbd81348a9996779..67121c7a5d6bc569ae3e40234b7b6a23cbf40f51 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-jsonschema
 PKG_VERSION:=4.17.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=jsonschema
 PKG_HASH:=0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d
@@ -11,7 +11,7 @@ PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index f9d3c39d611298e8413515e44b4b78294e4a43fc..31820e35e691c8c0c7550870e9c7d7c1c2dd3e95 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pluggy
 PKG_VERSION:=0.13.1
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PYPI_NAME:=pluggy
 PKG_HASH:=15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 59b4f0fd145278ec3e327c496240a92502e6d1a3..07baf6693fe585318c45c39bf2f7587f99fcaab4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-psutil
 PKG_VERSION:=5.9.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=psutil
 PKG_HASH:=869842dbd66bb80c3217158e629d6fceaecc3a3166d3d1faee515b05dd26ca25
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=BSD 3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index ca20dbba6c63d789eea15373fdb5b62792262061..c909e10e83e1378bd77e0007bf19560ea3f4fe61 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-py
 PKG_VERSION:=1.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=py
 PKG_HASH:=21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index dba2daa8fb977ab1a94a9fe63adc933b4da311ba..55edae8f59e7165a7b2608c71da2cb7e27ea151c 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest-forked
 PKG_VERSION:=1.3.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PYPI_NAME:=pytest-forked
 PKG_HASH:=6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index c73229bee5ba6dc5d06b65b0094b6d036f7b66ed..2aaf5551a46ee6d4cc99204e2f0b93e3120215cc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest-xdist
 PKG_VERSION:=2.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pytest-xdist
 PKG_HASH:=718887296892f92683f6a51f25a3ae584993b06f7076ce1e1fd482e59a8220a2
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 7a91b4f637cc76684d4e5513902a963a4889997b..108cb7f0c1f995c8d5aaf7dcee96d56e482787dc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest
 PKG_VERSION:=6.2.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pytest
 PKG_HASH:=671238a46e4df0f3498d1c3270e5deb9b32d25134c99b7d75370a68cfbe9b634
@@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/lang/python/python-setuptools-scm/Makefile b/lang/python/python-setuptools-scm/Makefile
new file mode 100644 (file)
index 0000000..c9a0ec7
--- /dev/null
@@ -0,0 +1,68 @@
+#
+# 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-scm
+PKG_VERSION:=7.1.0
+PKG_RELEASE:=1
+
+PYPI_NAME:=setuptools-scm
+PYPI_SOURCE_NAME:=setuptools_scm
+PKG_HASH:=6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27
+
+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-build/host \
+       python-installer/host \
+       python-wheel/host \
+       python-packaging/host \
+       python-tomli/host \
+       python-typing-extensions/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-setuptools-scm
+  SECTION:=lang
+  CATEGORY:=Languages
+  SUBMENU:=Python
+  TITLE:=the blessed package to manage your versions by scm tags
+  URL:=https://github.com/pypa/setuptools_scm
+  DEPENDS:= \
+      +python3-light \
+      +python3-logging \
+      +python3-packaging \
+      +python3-setuptools \
+      +python3-tomli \
+      +python3-typing-extensions
+  BUILDONLY:=1
+endef
+
+define Package/python3-setuptools-scm/description
+setuptools_scm extracts Python package versions from git or hg metadata
+instead of declaring them as the version argument or in a SCM managed
+file.
+
+Additionally setuptools_scm provides setuptools with a list of files
+that are managed by the SCM (i.e. it automatically adds all of the
+SCM-managed files to the sdist). Unwanted files must be excluded by
+discarding them via MANIFEST.in.
+endef
+
+$(eval $(call Py3Package,python3-setuptools-scm))
+$(eval $(call BuildPackage,python3-setuptools-scm))
+$(eval $(call BuildPackage,python3-setuptools-scm-src))
+$(eval $(call HostBuild))
index 17c442952f7797b00ca085648cf45500bc68657a..3d48b31c31c52f71fa6ae9a887b8309a37d6423a 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-zipp
 PKG_VERSION:=3.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=zipp
 PKG_HASH:=3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76
@@ -11,7 +11,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm toml  # setuptools_scm[toml] >= 3.4.1
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host  # setuptools_scm[toml] >= 3.4.1
 
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
index 60e7b3b1221bc86a7b13bb15f215212973633adc..9acbec99fc7abd06d6009e81263c679024025aeb 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=onionshare-cli
 PKG_VERSION:=2.3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=onionshare-cli
 PYPI_SOURCE_NAME:=onionshare_cli
@@ -19,7 +19,7 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm toml
+PKG_BUILD_DEPENDS:=python-setuptools-scm/host
 
 include ../../lang/python/pypi.mk
 include $(INCLUDE_DIR)/package.mk
index a77a17b8006aae2dddc24ffd5a73522e6d45381f..f812d2a2e3caba8353ce7c993b1d8eabdf56bcd2 100644 (file)
@@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apparmor
 PKG_VERSION:=3.0.3
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://gitlab.com/apparmor/apparmor/-/archive/v$(PKG_VERSION)
@@ -15,8 +15,7 @@ PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
 
-PKG_BUILD_DEPENDS:=swig/host
-HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
+PKG_BUILD_DEPENDS:=swig/host python-setuptools-scm/host
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -131,8 +130,6 @@ define Build/Compile
 endef
 
 define Build/Install
-       # Make sure we have python's setup tools installed
-       $(call Py3Build/InstallBuildDepends)
        $(INSTALL_DIR) $(PKG_INSTALL_DIR)-libapparmor $(PKG_INSTALL_DIR)-utils $(PKG_INSTALL_DIR)-profiles
        # Installing libapparmor
        +$(MAKE_VARS) PYTHON=$(HOST_PYTHON) VERSION=$(PYTHON3_VERSION) \