archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-perf / trunk / PKGBUILD
blobb6047337f008a086eaf603f986184576efcb75e3
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: j605
4 _name=pyperf
5 pkgname='python-perf'
6 pkgver=2.5.0
7 pkgrel=2
8 pkgdesc='Toolkit to run Python benchmarks'
9 url='https://github.com/psf/pyperf'
10 arch=('any')
11 license=('MIT')
12 depends=('python' 'python-psutil')
13 makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
14 provides=(python-pyperf)
15 source=($url/archive/$pkgver/$_name-$pkgver.tar.gz)
16 sha512sums=('e4e873fa041de2b8aa866927d8a8af2438495e7ef48e2a6871a0c40048453ec30e80d94d0c19a0ed1603d2fe29d924cf19cbc2a32eb3e2e976c56d9c4a36f88e')
17 b2sums=('c015eb823dda5995ae097d19355f6f55b6b5230c2268c33493064fa42fa07ca6e1a19ceb727809769e978529cca58850f8b9f9e521a556ae4497b805183d049f')
19 build() {
20   cd $_name-$pkgver
21   python -m build --wheel --no-isolation
24 check() {
25   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
27   cd $_name-$pkgver
28   python -m installer --destdir=test_dir dist/*.whl
29   export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
31   python -m unittest discover -s $_name/tests/ -v
34 package(){
35   cd $_name-$pkgver
36   python -m installer --destdir="$pkgdir" dist/*.whl
37   install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
38   install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
41 # vim: ts=2 sw=2 et: