diff --git a/srcpkgs/python3-flit_core/template b/srcpkgs/python3-flit_core/template index 73e8809560e..95077e9f47c 100644 --- a/srcpkgs/python3-flit_core/template +++ b/srcpkgs/python3-flit_core/template @@ -1,19 +1,39 @@ # Template file for 'python3-flit_core' pkgname=python3-flit_core -version=3.7.1 -revision=2 -build_wrksrc="flit_core" -build_style=python3-pep517 -depends="python3-tomli" +version=3.8.0 +revision=1 +build_wrksrc="flit-${version}/flit_core" +# This package is required by python3-build and python3-installer, used by the +# python3-pep517 style; so using that style here would create a cycle +build_style=python3-module +hostmakedepends="python3" +depends="python3" checkdepends="python3-pytest python3-testpath $depends" short_desc="Simplified packaging of Python modules - PEP 517 build backend" maintainer="Andrew J. Hesford " license="BSD-3-Clause" homepage="https://flit.readthedocs.io" changelog="https://flit.readthedocs.io/en/latest/history.html" -distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz" -checksum=3c9bd9c140515bfe62dd938c6610d10d6efb9e35cc647fc614fe5fb3a5036682 +# Pull the installer package directly to bootstrap the pep517 toolchain +_installer_version="0.5.1" +distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz + ${PYPI_SITE}/i/installer/installer-${_installer_version}.tar.gz +" +checksum="d0f2a8f4bd45dc794befbf5839ecc0fd3830d65a57bd52b5997542fac5d5e937 + f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445" + +do_build() { + python3 -m flit_core.wheel +} + +do_install() { + local pypath="../../installer-${_installer_version}/src" + if [ -n "${PYTHONPATH}" ]; then + pypath="${pypath}:${PYTHONPATH}" + fi + + PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \ + "dist/flit_core-${version}-py3-none-any.whl" -post_install() { vlicense ../LICENSE }