Date: Tuesday, November 8, 2022 @ 12:14:02 Author: yan12125 Revision: 1345921
upgpkg: python-pytest-env 0.8.1-1; switch to the new upstream [1] * Switch to PEP517 following upstream * Add check() [1] https://github.com/MobileDynasty/pytest-env/issues/16 Modified: python-pytest-env/trunk/PKGBUILD ----------+ PKGBUILD | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-11-08 12:03:06 UTC (rev 1345920) +++ PKGBUILD 2022-11-08 12:14:02 UTC (rev 1345921) @@ -2,27 +2,35 @@ # Contributor: Rafael Fontenelle <[email protected]> pkgname=python-pytest-env -pkgver=0.6.2 -_commit=afb13a0e908f649b69273f299262ac12f1b71113 -pkgrel=4 -pkgdesc='pytest plugin used to set environment variables' +pkgver=0.8.1 +pkgrel=1 +pkgdesc='pytest plugin to set environment variables in pytest.ini or pyproject.toml file' arch=(any) -url='https://github.com/MobileDynasty/pytest-env' +url='https://github.com/pytest-dev/pytest-env' license=(MIT) -depends=(python-pytest) -makedepends=(python-setuptools) -# Upstream does not use git tags, and the tarball on PyPI does not include the LICENSE file -# https://github.com/MobileDynasty/pytest-env/issues/6 -source=($pkgname-$pkgver.tar.gz::https://github.com/MobileDynasty/pytest-env/archive/$_commit/$pkgname-$_commit.tar.gz) -sha256sums=('653b29ab430dc99ee442776415ebf4e82e225b203d993108f0bf4845f8dbeaa8') +depends=(python python-pytest) +makedepends=(python-build python-installer python-hatchling python-hatch-vcs) +source=($pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-env/archive/$pkgver/$pkgname-$pkgver.tar.gz) +sha256sums=('9d11794e2d1dd4fd4e60eea608befd470b43e845cbd123692c6e12cec7158f7c') +export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + build() { - cd pytest-env-$_commit - python setup.py build + cd pytest-env-$pkgver + python -m build --wheel --no-isolation } +check() { + cd pytest-env-$pkgver + # Install to a temporary root as the test suite requires the entry point for + # its pytest plugin + pyver=$(python -c "import sys; print('{}.{}'.format(*sys.version_info[:2]))") + python -m installer --destdir="$PWD/tmp_install" dist/*.whl + PYTHONPATH="$PWD/tmp_install/usr/lib/python$pyver/site-packages" pytest tests +} + package() { - cd pytest-env-$_commit - python setup.py install --root="$pkgdir" --optimize=1 --skip-build + cd pytest-env-$pkgver + python -m installer --destdir="$pkgdir" dist/*.whl install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname }
