# Maintainer: Carlos Aznarán _base=pytest-codeblocks pkgname=python-${_base} pkgdesc="Test code blocks in your READMEs" pkgver=0.17.0 pkgrel=1 arch=(any) url="https://github.com/nschloe/${_base}" license=(MIT) depends=(python-pytest) makedepends=(python-build python-installer python-setuptools python-wheel) source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz) sha512sums=('20044f10e997fbe15a8389aebdad324c2b102a11287315c8c85042f5497f51723c030b918f0cd923beb9f0c5b33a41673426a8c550814e1bd8b9b5476dd0dbf5') 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 -p pytester } package() { cd ${_base}-${pkgver} PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}" }