Date: Thursday, April 6, 2023 @ 13:06:47
Author: felixonmars
Revision: 1438757
archrelease: copy trunk to community-staging-any
Added:
python-pytest-env/repos/community-staging-any/
python-pytest-env/repos/community-staging-any/PKGBUILD
(from rev 1438756, python-pytest-env/trunk/PKGBUILD)
----------+
PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
Copied: python-pytest-env/repos/community-staging-any/PKGBUILD (from rev
1438756, python-pytest-env/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-06 13:06:47 UTC (rev 1438757)
@@ -0,0 +1,36 @@
+# Maintainer: Chih-Hsuan Yen <[email protected]>
+# Contributor: Rafael Fontenelle <[email protected]>
+
+pkgname=python-pytest-env
+pkgver=0.8.1
+pkgrel=2
+pkgdesc='pytest plugin to set environment variables in pytest.ini or
pyproject.toml file'
+arch=(any)
+url='https://github.com/pytest-dev/pytest-env'
+license=(MIT)
+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-$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-$pkgver
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
+}