upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-pytest-benchmark / trunk / PKGBUILD
blob6b7716ee1a43067abef660e379fc7cda7789ecdd
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-pytest-benchmark
4 pkgver=4.0.0
5 pkgrel=4
6 pkgdesc='A py.test fixture for benchmarking code'
7 arch=('any')
8 license=('BSD')
9 url='https://github.com/ionelmc/pytest-benchmark'
10 depends=('python-pytest' 'python-py-cpuinfo')
11 makedepends=('python-setuptools')
12 checkdepends=('python-pygal' 'python-pygaljs' 'python-freezegun' 'mercurial' 'python-aspectlib'
13               'python-pytest-xdist' 'python-elasticsearch' 'git')
14 source=("$pkgname-$pkgver.tar.gz::https://github.com/ionelmc/pytest-benchmark/archive/v$pkgver.tar.gz"
15         'pytest-benchmark-backport-232.patch::https://github.com/ionelmc/pytest-benchmark/pull/232.patch')
16 sha512sums=('88636e44c184f5072ad081a89f08e8838a11397e6b88298d7f235b531f894792001b858fc5c810b1399d41ec55de5db9057552fb7544fb405a04c3ba5ffbe329'
17             'f8a0ea70dd0a29b65b4755e491b3ffc201f4dcc15673d821f1c708ca9a376877a2931fddadbfacbe41f3503b25ad5099fe9bc04bb6fe7399f12ae2b4a6d07257')
19 prepare() {
20   cd pytest-benchmark-$pkgver
21   # Do not treat warnings as errors
22   sed -i '/^    error$/d' pytest.ini
23   patch --forward --strip=1 --input=../pytest-benchmark-backport-232.patch
26 build() {
27   cd pytest-benchmark-$pkgver
28   python setup.py build
31 check() {
32   # Hack entry points by installing it
34   cd pytest-benchmark-$pkgver
35   python setup.py install --root="$PWD/tmp_install" --optimize=1
36   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
37   PYTHONPATH="$PWD/tmp_install/$site_packages:$PYTHONPATH" PATH="$PWD/tmp_install/usr/bin:$PATH" python -m pytest tests
40 package() {
41   cd "$srcdir"/pytest-benchmark-$pkgver
42   python setup.py install --root="$pkgdir"/ --optimize=1
43   install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
46 # vim:set ts=2 sw=2 et: