Date: Sunday, July 31, 2022 @ 11:16:15 Author: dvzrv Revision: 1259297
Add python-pytest-httpserver as new checkdepends for python-unearth. Added: python-pytest-httpserver/ python-pytest-httpserver/repos/ python-pytest-httpserver/trunk/ python-pytest-httpserver/trunk/PKGBUILD ----------+ PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) Added: python-pytest-httpserver/trunk/PKGBUILD =================================================================== --- python-pytest-httpserver/trunk/PKGBUILD (rev 0) +++ python-pytest-httpserver/trunk/PKGBUILD 2022-07-31 11:16:15 UTC (rev 1259297) @@ -0,0 +1,38 @@ +# Maintainer: David Runge <dv...@archlinux.org> + +_name=pytest_httpserver +pkgname=python-pytest-httpserver +pkgver=1.0.5 +pkgrel=1 +pkgdesc="Http server for pytest to test http clients" +arch=(any) +url="https://github.com/csernazs/pytest-httpserver" +license=(MIT) +depends=(python python-pytest python-werkzeug) +makedepends=(python-build python-installer python-poetry-core python-wheel) +checkdepends=(python-ipdb python-pytest python-requests) +source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz) +sha256sums=('ae3296626d0a10e835a9f423c61b4540547d582422be054c3fcc08626baa1024') +b2sums=('2b8335b011908084d091cebc5fa9fe62ecfd9e28e8967b5299931dbf829b86f44c10b25a3a4c4297428b5300efa65847b9e86f0d7fe0619e561f55b3ba5d6540') + +build() { + cd $_name-$pkgver + python -m build --wheel --no-isolation +} + +check() { + local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + + cd $_name-$pkgver + # install to temporary location, as importlib is used + python -m installer --destdir=test_dir dist/*.whl + export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH" + pytest -vv +} + +package() { + cd $_name-$pkgver + python -m installer --destdir="$pkgdir" dist/*.whl + install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" + install -vDm 644 CHANGES.rst README.md -t "$pkgdir/usr/share/doc/$pkgname/" +}