# Maintainer: Carlos Aznarán <caznaranl@uni.pe> # Contributor: Luis Martinez <luis dot martinez at disroot dot org> # Contributor: Leon <aur@adigitoleo.dissimulo.com> _base=bytecode pkgname=python-${_base} pkgver=0.16.2 pkgrel=1 pkgdesc="Python module to generate and modify bytecode" arch=(any) url="https://github.com/MatthieuDartiailh/${_base}" license=(MIT) depends=(python) makedepends=(python-build python-installer python-setuptools python-wheel) checkdepends=(python-pytest) source=(https://pypi.org/packages/source/${_base::1}/${_base}/${_base}-${pkgver}.tar.gz) sha512sums=('5ab859860743f8096117cb45c7b9c93be86cf99953e7e7b8eb56319dc4c33ecb65c2adff68096a76c67505e529eaa824a5d0bd3cf15f8352bb54fddbf8150b8b') build() { cd ${_base}-${pkgver} python -m build --wheel --skip-dependency-check --no-isolation } check() { cd ${_base}-${pkgver} python -m venv --system-site-packages test-env test-env/bin/python -m installer dist/*.whl test-env/bin/python -m pytest tests } package() { cd ${_base}-${pkgver} PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl }