mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 04:26:43 +02:00
54 lines
1.4 KiB
Text
54 lines
1.4 KiB
Text
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
|
|
maintainer="fossdd <fossdd@pwned.life>"
|
|
pkgname=py3-pytest
|
|
pkgver=8.3.5
|
|
pkgrel=0
|
|
pkgdesc="Python3 testing library"
|
|
url="https://docs.pytest.org/en/latest/"
|
|
arch="noarch"
|
|
license="MIT"
|
|
depends="
|
|
py3-iniconfig
|
|
py3-packaging
|
|
py3-pluggy
|
|
py3-py
|
|
"
|
|
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
|
|
checkdepends="bash py3-hypothesis py3-virtualenv py3-xmlschema"
|
|
subpackages="$pkgname-pyc"
|
|
source="https://files.pythonhosted.org/packages/source/p/pytest/pytest-$pkgver.tar.gz
|
|
"
|
|
builddir="$srcdir/pytest-$pkgver"
|
|
options="!check" # causes bootstrapping issues because of checkdepends
|
|
|
|
replaces="pytest" # Backwards compatibility
|
|
provides="pytest=$pkgver-r$pkgrel" # Backwards compatibility
|
|
|
|
build() {
|
|
SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" \
|
|
gpep517 build-wheel \
|
|
--wheel-dir .dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
python3 -m venv --clear --without-pip --system-site-packages test-env
|
|
test-env/bin/python3 -m installer .dist/pytest*.whl
|
|
|
|
test-env/bin/python3 -m pytest
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"/usr/bin
|
|
|
|
local name; for name in py.test pytest; do
|
|
ln -s $name-3 "$pkgdir"/usr/bin/$name
|
|
done
|
|
|
|
python3 -m installer -d "$pkgdir" \
|
|
.dist/pytest*.whl
|
|
}
|
|
|
|
sha512sums="
|
|
386573a40f78c1dc864a0af7d765d49e9e91a38dd61bef95b07631bffba0806b34264622a998e849727f50fb220ada7b8242f7f7dbd501408e7bf4701d36589d pytest-8.3.5.tar.gz
|
|
"
|