From: Jeffery To Date: Fri, 17 Feb 2023 00:49:36 +0000 (+0800) Subject: python-setuptools-scm: Add new host-only package X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3ee4e7297cf07b644bac3dfafc508da5f31bf63d;p=feed%2Fpackages.git python-setuptools-scm: Add new host-only package 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 --- diff --git a/lang/python/host-pip-requirements/setuptools-scm.txt b/lang/python/host-pip-requirements/setuptools-scm.txt deleted file mode 100644 index 83b57e1d31..0000000000 --- a/lang/python/host-pip-requirements/setuptools-scm.txt +++ /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 index 108bf1007e..0000000000 --- a/lang/python/host-pip-requirements/toml.txt +++ /dev/null @@ -1 +0,0 @@ -toml==0.10.2 --hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f diff --git a/lang/python/python-apipkg/Makefile b/lang/python/python-apipkg/Makefile index 2e905a8932..b337818312 100644 --- a/lang/python/python-apipkg/Makefile +++ b/lang/python/python-apipkg/Makefile @@ -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 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-bidict/Makefile b/lang/python/python-bidict/Makefile index b6735b82fa..f95eb07e98 100644 --- a/lang/python/python-bidict/Makefile +++ b/lang/python/python-bidict/Makefile @@ -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 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 diff --git a/lang/python/python-dateutil/Makefile b/lang/python/python-dateutil/Makefile index 394a307b6f..57e8a95aa8 100644 --- a/lang/python/python-dateutil/Makefile +++ b/lang/python/python-dateutil/Makefile @@ -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 -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-execnet/Makefile b/lang/python/python-execnet/Makefile index 1b45788d47..b82b4fd9f6 100644 --- a/lang/python/python-execnet/Makefile +++ b/lang/python/python-execnet/Makefile @@ -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 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-iniconfig/Makefile b/lang/python/python-iniconfig/Makefile index 5d5da76172..98cd0cd7a0 100644 --- a/lang/python/python-iniconfig/Makefile +++ b/lang/python/python-iniconfig/Makefile @@ -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 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-jsonschema/Makefile b/lang/python/python-jsonschema/Makefile index 4167ef29c0..67121c7a5d 100644 --- a/lang/python/python-jsonschema/Makefile +++ b/lang/python/python-jsonschema/Makefile @@ -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 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 diff --git a/lang/python/python-pluggy/Makefile b/lang/python/python-pluggy/Makefile index f9d3c39d61..31820e35e6 100644 --- a/lang/python/python-pluggy/Makefile +++ b/lang/python/python-pluggy/Makefile @@ -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 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-psutil/Makefile b/lang/python/python-psutil/Makefile index 59b4f0fd14..07baf6693f 100644 --- a/lang/python/python-psutil/Makefile +++ b/lang/python/python-psutil/Makefile @@ -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 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 diff --git a/lang/python/python-py/Makefile b/lang/python/python-py/Makefile index ca20dbba6c..c909e10e83 100644 --- a/lang/python/python-py/Makefile +++ b/lang/python/python-py/Makefile @@ -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 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-pytest-forked/Makefile b/lang/python/python-pytest-forked/Makefile index dba2daa8fb..55edae8f59 100644 --- a/lang/python/python-pytest-forked/Makefile +++ b/lang/python/python-pytest-forked/Makefile @@ -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 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-pytest-xdist/Makefile b/lang/python/python-pytest-xdist/Makefile index c73229bee5..2aaf5551a4 100644 --- a/lang/python/python-pytest-xdist/Makefile +++ b/lang/python/python-pytest-xdist/Makefile @@ -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 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-pytest/Makefile b/lang/python/python-pytest/Makefile index 7a91b4f637..108cb7f0c1 100644 --- a/lang/python/python-pytest/Makefile +++ b/lang/python/python-pytest/Makefile @@ -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 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 index 0000000000..c9a0ec78d9 --- /dev/null +++ b/lang/python/python-setuptools-scm/Makefile @@ -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 + +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)) diff --git a/lang/python/python-zipp/Makefile b/lang/python/python-zipp/Makefile index 17c442952f..3d48b31c31 100644 --- a/lang/python/python-zipp/Makefile +++ b/lang/python/python-zipp/Makefile @@ -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 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 diff --git a/net/onionshare-cli/Makefile b/net/onionshare-cli/Makefile index 60e7b3b122..9acbec99fc 100644 --- a/net/onionshare-cli/Makefile +++ b/net/onionshare-cli/Makefile @@ -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 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 diff --git a/utils/apparmor/Makefile b/utils/apparmor/Makefile index a77a17b800..f812d2a2e3 100644 --- a/utils/apparmor/Makefile +++ b/utils/apparmor/Makefile @@ -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 -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) \