diff options
| author | Michał Polański <michal@polanski.me> | 2020-03-01 19:25:36 +0100 |
|---|---|---|
| committer | Leo <thinkabit.ukim@gmail.com> | 2020-03-01 17:17:33 -0300 |
| commit | 3bd4ffb8790ff2dd9eedead0a32bb06c8447b2d4 (patch) | |
| tree | 8eb3fbb39379fb67c42dbb58c750d84a03d26186 /testing/py3-pytest-benchmark | |
| parent | 6d6c4014ee98005f50334b971dc7dfcb930bf869 (diff) | |
| download | aports-3bd4ffb8790ff2dd9eedead0a32bb06c8447b2d4.tar.bz2 aports-3bd4ffb8790ff2dd9eedead0a32bb06c8447b2d4.tar.xz | |
testing/py3-pytest-benchmark: new aport
Diffstat (limited to 'testing/py3-pytest-benchmark')
| -rw-r--r-- | testing/py3-pytest-benchmark/APKBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/py3-pytest-benchmark/APKBUILD b/testing/py3-pytest-benchmark/APKBUILD new file mode 100644 index 0000000000..7427827a3b --- /dev/null +++ b/testing/py3-pytest-benchmark/APKBUILD @@ -0,0 +1,39 @@ +# Contributor: Michał Polański <michal@polanski.me> +# Maintainer: Michał Polański <michal@polanski.me> +pkgname=py3-pytest-benchmark +_pkgname=pytest-benchmark +pkgver=3.2.3 +pkgrel=0 +pkgdesc="A pytest fixture for benchmarking code" +url="https://github.com/ionelmc/pytest-benchmark" +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="$_pkgname-$pkgver.tar.gz::https://github.com/ionelmc/pytest-benchmark/archive/v$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + python3 setup.py build +} + +check() { + # install the package to test_install directory for testing + python3 setup.py install --root="$builddir"/test_install + + # 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 + PYTHONPATH="$builddir"/test_install/usr/lib/python3.8/site-packages PATH="$builddir"/test_install/usr/bin:"$PATH" \ + pytest -v tests \ + --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 +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" --skip-build +} + +sha512sums="952dbe2a9af1ae5de966543eae3b4523a5418c8441785714cbb7a5d17697046f060befb4a40cf216526e2a9a63d91c598d65e65618bd78fc2d889c92cecbbe53 pytest-benchmark-3.2.3.tar.gz" |
