Date: Wednesday, April 5, 2023 @ 20:30:17
Author: felixonmars
Revision: 1438002
archrelease: copy trunk to community-staging-any
Added:
python-pytest-httpserver/repos/community-staging-any/
python-pytest-httpserver/repos/community-staging-any/PKGBUILD
(from rev 1437998, python-pytest-httpserver/trunk/PKGBUILD)
----------+
PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
Copied: python-pytest-httpserver/repos/community-staging-any/PKGBUILD (from rev
1437998, python-pytest-httpserver/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-05 20:30:17 UTC (rev 1438002)
@@ -0,0 +1,38 @@
+# Maintainer: David Runge <[email protected]>
+
+_name=pytest_httpserver
+pkgname=python-pytest-httpserver
+pkgver=1.0.6
+pkgrel=2
+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=('9040d07bf59ac45d8de3db1d4468fd2d1d607975e4da4c872ecc0402cdbf7b3e')
+b2sums=('0a3afcd370b502264eb7a5fa9ce4d82fed34c4a4b53597423bb157b15ed3bd2f02976b24f4d803928ad6bed5ad40612587d2541afb438cc634ca43bda9781ae1')
+
+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 --ignore tests/test_release.py
+}
+
+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/"
+}