From 9d868884cd5ca18203e353053d234256b1498a06 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 2 Dec 2024 09:42:00 -0500 Subject: [PATCH] New package: python3-packaging-bootstrap-24.1 needed for verifying python module dependencies --- srcpkgs/python3-packaging-bootstrap/template | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 srcpkgs/python3-packaging-bootstrap/template diff --git a/srcpkgs/python3-packaging-bootstrap/template b/srcpkgs/python3-packaging-bootstrap/template new file mode 100644 index 00000000000..192fff3734b --- /dev/null +++ b/srcpkgs/python3-packaging-bootstrap/template @@ -0,0 +1,40 @@ +# Template file for 'python3-packaging-bootstrap' +pkgname=python3-packaging-bootstrap +version=24.1 +revision=1 +# This package is required by python3-build, used by the python3-pep517 style; +# using that style here would create a cycle +build_style=python3-module +hostmakedepends="python3-flit_core-bootstrap python3-installer-bootstrap" +depends="python3" +short_desc="Core utilities for Python 3 packages (for xbps-src use)" +maintainer="Andrew J. Hesford " +license="Apache-2.0, BSD-2-Clause" +homepage="https://github.com/pypa/packaging" +distfiles="${PYPI_SITE}/p/packaging/packaging-${version}.tar.gz" +checksum=026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 +make_check=no # provides no tests, bootstrap +repository=bootstrap +nopyprovides=yes +noverifypydeps=yes + +do_build() { + local pypath="/${py3_sitelib}-bootstrap" + if [ -n "${PYTHONPATH}" ]; then + pypath="${pypath}:${PYTHONPATH}" + fi + + PYTHONPATH="${pypath}" python3 -m flit_core.wheel +} + +do_install() { + local pypath="/${py3_sitelib}-bootstrap" + if [ -n "${PYTHONPATH}" ]; then + pypath="${pypath}:${PYTHONPATH}" + fi + + PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \ + "dist/packaging-${version}-py3-none-any.whl" + mv "${DESTDIR}/${py3_sitelib}" "${DESTDIR}/${py3_sitelib}-bootstrap" + vlicense LICENSE +}