blob: 908e720598fb5269abb60eb0885024dfb0222ee4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-pytest
pkgver=7.2.0
pkgrel=1
pkgdesc="Python3 testing library"
url="https://docs.pytest.org/en/latest/"
arch="noarch"
license="MIT"
depends="
py3-attrs
py3-iniconfig
py3-packaging
py3-pluggy
py3-py
python3
"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="bash py3-hypothesis py3-virtualenv py3-xmlschema"
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
prepare() {
default_prepare
sed -e "/^\[metadata\]/a version = $pkgver" -i setup.cfg
}
build() {
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 1
}
check() {
python3 -m venv --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="
a16b034c8522f0aa6ee9541b07b79be713565a6e755ab0489b38c2b0a0ed9f7857c87f952ff24c199a2e4c0d71ee26e918dd06abfe994d30ac90e32ae3e8c4d1 pytest-7.2.0.tar.gz
"
|