archrelease: copy trunk to community-any
[arch-community.git] / python-pytest-httpserver / trunk / PKGBUILD
blob6560a4e5d803150a58dcca01de48e06296d32c26
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=pytest_httpserver
4 pkgname=python-pytest-httpserver
5 pkgver=1.0.6
6 pkgrel=3
7 pkgdesc="Http server for pytest to test http clients"
8 arch=(any)
9 url="https://github.com/csernazs/pytest-httpserver"
10 license=(MIT)
11 depends=(python python-pytest python-werkzeug)
12 makedepends=(python-build python-installer python-poetry-core python-wheel)
13 checkdepends=(python-ipdb python-pytest python-requests)
14 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
15 sha256sums=('9040d07bf59ac45d8de3db1d4468fd2d1d607975e4da4c872ecc0402cdbf7b3e')
16 b2sums=('0a3afcd370b502264eb7a5fa9ce4d82fed34c4a4b53597423bb157b15ed3bd2f02976b24f4d803928ad6bed5ad40612587d2541afb438cc634ca43bda9781ae1')
18 build() {
19   cd $_name-$pkgver
20   python -m build --wheel --no-isolation
23 check() {
24   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
26   cd $_name-$pkgver
27   # install to temporary location, as importlib is used
28   python -m installer --destdir=test_dir dist/*.whl
29   export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
30   pytest -vv --ignore tests/test_release.py
33 package() {
34   cd $_name-$pkgver
35   python -m installer --destdir="$pkgdir" dist/*.whl
36   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
37   install -vDm 644 CHANGES.rst README.md -t "$pkgdir/usr/share/doc/$pkgname/"