Date: Sunday, July 31, 2022 @ 11:18:48
  Author: dvzrv
Revision: 1259300

archrelease: copy trunk to community-any

Added:
  python-pytest-httpserver/repos/community-any/
  python-pytest-httpserver/repos/community-any/PKGBUILD
    (from rev 1259299, python-pytest-httpserver/trunk/PKGBUILD)

----------+
 PKGBUILD |   38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

Copied: python-pytest-httpserver/repos/community-any/PKGBUILD (from rev 
1259299, python-pytest-httpserver/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD                              (rev 0)
+++ community-any/PKGBUILD      2022-07-31 11:18:48 UTC (rev 1259300)
@@ -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/"
+}

Reply via email to