1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 11:45:18 +03:00
aports/testing/py3-pytest-env/APKBUILD
psykose aa528d2a76 */*: unify gpep517 use to output to fd 3
outputting to 3 then redirecting all to stderr prevents clobbering of
wrapped build fds
2023-01-18 12:58:53 +01:00

36 lines
1.1 KiB
Text

# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-pytest-env
_pyname=pytest_env
pkgver=0.8.1
pkgrel=1
pkgdesc="Pytest plugin for adding environment variables"
url="https://github.com/MobileDynasty/pytest-env"
arch="noarch"
license="MIT"
depends="python3 py3-pytest"
makedepends="py3-gpep517 py3-hatchling py3-hatch-vcs py3-installer"
checkdepends="py3-pytest"
source="$_pyname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
build() {
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m installer -d testenv \
dist/$_pyname-$pkgver-py3-none-any.whl
local sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
PYTHONPATH="$PWD/testenv/$sitedir" python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
dist/$_pyname-$pkgver-py3-none-any.whl
}
sha512sums="
0c99db9c5467f5fe6f8655e540fff4b91884cef3553daf455298d2dc7bb51439418f3149b941d37a777199f28d82eccb2073fdd5e09bfb97cdf24d3ddb1d21bc pytest_env-0.8.1.tar.gz
"