From a28ec67bb3695ce31c545416c10633141e282811 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 8 Nov 2022 11:00:25 -0500 Subject: [PATCH] New package: python3-installer-0.5.1 --- srcpkgs/python3-installer/template | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 srcpkgs/python3-installer/template diff --git a/srcpkgs/python3-installer/template b/srcpkgs/python3-installer/template new file mode 100644 index 00000000000..b8038996be3 --- /dev/null +++ b/srcpkgs/python3-installer/template @@ -0,0 +1,36 @@ +# Template file for 'python3-installer' +pkgname=python3-installer +version=0.5.1 +revision=1 +# This package is used by the python3-pep517 build style; using that style here +# would create a build cycle +build_style=python3-module +hostmakedepends="python3-flit_core" +depends="python3" +checkdepends="python3-pytest-xdist" +short_desc="Low-level library for installing from a Python wheel" +maintainer="Andrew J. Hesford " +license="MIT" +homepage="https://installer.readthedocs.io/" +distfiles="${PYPI_SITE}/i/installer/installer-${version}.tar.gz" +checksum=f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445 + +do_build() { + python3 -m flit_core.wheel +} + +do_check() { + PYTHONPATH=src python3 -m pytest -n $XBPS_MAKEJOBS +} + +do_install() { + local pypath="./src" + if [ -n "${PYTHONPATH}" ]; then + pypath="${pypath}:${PYTHONPATH}" + fi + + PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \ + "dist/installer-${version}-py3-none-any.whl" + + vlicense LICENSE +}