blob: 20f0853fd341f83353bab86401fc52bbe319a796 (
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
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
pkgname=python-pytest-json-report
_name=${pkgname#python-}
pkgver=1.5.0
pkgrel=1
pkgdesc="A pytest plugin to report test results as JSON"
arch=(any)
url="https://github.com/numirias/pytest-json-report"
license=(MIT)
depends=(
python
python-pytest
python-pytest-metadata
)
makedepends=(
python-build
python-installer
python-setuptools
python-wheel
)
checkdepends=(
python-flaky
python-pytest-xdist
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('8933f634c094e709e08c381796322e88b3cb699c4c63c3d9d789ad638d8d7cdb')
_archive="$_name-$pkgver"
build() {
cd "$_archive"
python -m build --wheel --no-isolation
}
check() {
cd "$_archive"
rm -rf tmp_install
_site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
python -m installer --destdir=tmp_install dist/*.whl
export PYTHONPATH="$PWD/tmp_install/$_site_packages"
pytest \
--deselect tests/test_jsonreport.py::test_environment_via_metadata_plugin
}
package() {
cd "$_archive"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
|