aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pytest-benchmark/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-pytest-benchmark/APKBUILD')
-rw-r--r--community/py3-pytest-benchmark/APKBUILD45
1 files changed, 29 insertions, 16 deletions
diff --git a/community/py3-pytest-benchmark/APKBUILD b/community/py3-pytest-benchmark/APKBUILD
index bc8d6f838ba..c5b563196de 100644
--- a/community/py3-pytest-benchmark/APKBUILD
+++ b/community/py3-pytest-benchmark/APKBUILD
@@ -2,40 +2,53 @@
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-pytest-benchmark
_pkgname=pytest-benchmark
-pkgver=3.4.1
-pkgrel=0
+pkgver=4.0.0
+pkgrel=3
pkgdesc="pytest fixture for benchmarking code"
url="https://github.com/ionelmc/pytest-benchmark"
-arch="noarch !mips !mips64" # blocked by py3-py-cpuinfo
+arch="noarch"
license="BSD-2-Clause"
depends="python3 py3-pytest py3-py-cpuinfo"
-makedepends="py3-setuptools"
-checkdepends="py3-pytest-xdist py3-freezegun py3-pygal py3-elasticsearch"
-source="https://github.com/ionelmc/pytest-benchmark/archive/v$pkgver/pytest-benchmark-$pkgver.tar.gz"
+makedepends="py3-gpep517 py3-setuptools py3-wheel"
+checkdepends="py3-pytest-xdist py3-freezegun py3-pygal py3-pygaljs py3-elasticsearch"
+subpackages="$pkgname-pyc"
+source="https://github.com/ionelmc/pytest-benchmark/archive/v$pkgver/pytest-benchmark-$pkgver.tar.gz
+ $pkgname-$pkgver-py3.11.patch::https://github.com/ionelmc/pytest-benchmark/commit/b2f624afd68a3090f20187a46284904dd4baa4f6.patch
+ $pkgname-$pkgver-tests.patch::https://github.com/ionelmc/pytest-benchmark/commit/2b987f5be1873617f02f24cb6d76196f9aed21bd.patch
+ "
builddir="$srcdir/$_pkgname-$pkgver"
build() {
- python3 setup.py build
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- # install the package to test_install directory for testing
- python3 setup.py install --root="$builddir"/test_install
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
# disable three tests that require aspectlib (needs packaging)
- # last test fails when run inside a git repository, see: https://github.com/ionelmc/pytest-benchmark/issues/163
- local sitedir=$(python3 -c "import site; print(site.getsitepackages()[0])")
- PYTHONPATH="$builddir"/test_install/"$sitedir" PATH="$builddir"/test_install/usr/bin:"$PATH" \
- pytest -v tests \
+ # last 2 tests fail when run inside a git repository, see: https://github.com/ionelmc/pytest-benchmark/issues/163
+ PATH="$builddir/.testenv/bin:PATH" .testenv/bin/python3 -m \
+ pytest tests -n auto -p no:warnings \
--deselect tests/test_with_testcase.py::TerribleTerribleWayToWritePatchTests::test_foo2 \
--deselect tests/test_with_weaver.py::test_weave_fixture \
--deselect tests/test_with_weaver.py::test_weave_method \
--deselect tests/test_utils.py::test_parse_elasticsearch_storage \
- --deselect tests/test_cli.py::test_help_compare
+ --deselect tests/test_cli.py::test_help_compare \
+ --deselect tests/test_cli.py::test_help_list \
+ --deselect tests/test_cli.py::test_help_command \
+ --deselect tests/test_cli.py::test_help \
+ --deselect tests/test_utils.py::test_commit_info_error
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build
+ python3 -m installer -d "$pkgdir" .dist/*.whl
}
-sha512sums="54fb5e3a176578b3c8f339878c7a9d047a0785befcbba42bb68c34b4b636d9b6f6a2097b36c5eefbbcf1a91f943bdae762c7978a0dba1af53514052f513ef4c5 pytest-benchmark-3.4.1.tar.gz"
+sha512sums="
+88636e44c184f5072ad081a89f08e8838a11397e6b88298d7f235b531f894792001b858fc5c810b1399d41ec55de5db9057552fb7544fb405a04c3ba5ffbe329 pytest-benchmark-4.0.0.tar.gz
+6964ba9608dc36cd75913b85bea89f8fc0925d43064aed81b57b04c8801547c270015cd73c97285da91fead46d667fe75e043e5ecd09198ba6b48830c6c26927 py3-pytest-benchmark-4.0.0-py3.11.patch
+f053925aab4f615767c3cc7d4d61c6f3d15f8acc8600a50d9938181e728c03073a5a1eddf0c862e59427da8a9e22cefe0e36f4a9496391ac0178dadc3989fe05 py3-pytest-benchmark-4.0.0-tests.patch
+"