python3-flit_core: clean up bootstrapping

This commit is contained in:
icp 2023-05-19 01:37:37 +05:30 committed by Andrew J. Hesford
parent 4f0c3eccbd
commit 5e9a5d56da

View file

@ -1,39 +1,31 @@
# Template file for 'python3-flit_core' # Template file for 'python3-flit_core'
pkgname=python3-flit_core pkgname=python3-flit_core
version=3.9.0 version=3.9.0
revision=1 revision=2
build_wrksrc="flit-${version}/flit_core"
# This package is required by python3-build and python3-installer, used by the # 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 # python3-pep517 style; so using that style here would create a cycle
build_style=python3-module
hostmakedepends="python3" hostmakedepends="python3"
depends="python3" depends="python3"
checkdepends="python3-pytest python3-testpath $depends" checkdepends="python3-pytest python3-testpath $depends"
short_desc="Simplified packaging of Python modules - PEP 517 build backend" short_desc="Simplified packaging of Python modules - PEP 517 build backend"
maintainer="Andrew J. Hesford <ajh@sideband.org>" maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-3-Clause" license="BSD-3-Clause"
homepage="https://flit.readthedocs.io" homepage="https://flit.pypa.io/"
changelog="https://flit.readthedocs.io/en/latest/history.html" changelog="https://flit.pypa.io/en/stable/history.html"
# Pull the installer package directly to bootstrap the pep517 toolchain distfiles="${PYPI_SITE}/f/flit_core/flit_core-${version}.tar.gz"
_installer_version="0.5.1" checksum=72ad266176c4a3fcfab5f2930d76896059851240570ce9a98733b658cb786eba
distfiles="${PYPI_SITE}/f/flit/flit-${version}.tar.gz
${PYPI_SITE}/i/installer/installer-${_installer_version}.tar.gz
"
checksum="d75edf5eb324da20d53570a6a6f87f51e606eee8384925cd66a90611140844c7
f970995ec2bb815e2fdaf7977b26b2091e1e386f0f42eafd5ac811953dc5d445"
do_build() { do_build() {
python3 -m flit_core.wheel python3 -m flit_core.wheel
} }
do_install() { do_check() {
local pypath="../../installer-${_installer_version}/src" python3 -m pytest flit_core/tests
if [ -n "${PYTHONPATH}" ]; then }
pypath="${pypath}:${PYTHONPATH}"
fi
PYTHONPATH="${pypath}" python3 -m installer --destdir "${DESTDIR}" \ do_install() {
python3 bootstrap_install.py --install-root "${DESTDIR}" \
"dist/flit_core-${version}-py3-none-any.whl" "dist/flit_core-${version}-py3-none-any.whl"
vlicense ../LICENSE vlicense LICENSE
} }