diff options
| author | Michał Polański <michal@polanski.me> | 2020-03-03 23:01:28 +0100 |
|---|---|---|
| committer | Leo <thinkabit.ukim@gmail.com> | 2020-03-09 16:21:16 -0300 |
| commit | 75a598c7f7ba18adb51cbf3ee862f93650fabaf3 (patch) | |
| tree | c33c47522d18ddcaa7d36ef3f837a879fc5de33b /community/py3-pytest-benchmark | |
| parent | 31be30072ea32b11fece8037dc82ba4b84f3db61 (diff) | |
| download | aports-75a598c7f7ba18adb51cbf3ee862f93650fabaf3.tar.bz2 aports-75a598c7f7ba18adb51cbf3ee862f93650fabaf3.tar.xz | |
community/py3-pytest-benchmark: move from testing
Diffstat (limited to 'community/py3-pytest-benchmark')
| -rw-r--r-- | community/py3-pytest-benchmark/APKBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/community/py3-pytest-benchmark/APKBUILD b/community/py3-pytest-benchmark/APKBUILD new file mode 100644 index 0000000000..7427827a3b --- /dev/null +++ b/community/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" |
