Date: Thursday, December 15, 2022 @ 12:35:27
  Author: dvzrv
Revision: 1359251

archrelease: copy trunk to community-testing-any

Added:
  python-unearth/repos/community-testing-any/
  python-unearth/repos/community-testing-any/PKGBUILD
    (from rev 1359250, python-unearth/trunk/PKGBUILD)

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

Copied: python-unearth/repos/community-testing-any/PKGBUILD (from rev 1359250, 
python-unearth/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD                              (rev 0)
+++ community-testing-any/PKGBUILD      2022-12-15 12:35:27 UTC (rev 1359251)
@@ -0,0 +1,42 @@
+# Maintainer: David Runge <[email protected]>
+
+_name=unearth
+pkgname=python-unearth
+pkgver=0.7.0
+pkgrel=1
+pkgdesc="A utility to fetch and download python packages"
+arch=(any)
+url="https://github.com/frostming/unearth";
+license=(MIT)
+depends=(python-packaging python-requests)
+makedepends=(python-build python-installer python-pdm-pep517 python-wheel)
+checkdepends=(python-flask python-pytest python-pytest-httpserver 
python-requests-wsgi-adapter python-trustme)
+optdepends=('python-keyring: use keyring for authentication')
+source=(
+  
https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz
+)
+sha256sums=('cf54411b37b7a941f3cdfdf29aeee2bf18164a8afca35c467b97feab626e671e')
+b2sums=('a8e81bffc553cbcb3ccb2fb8051ad13229a6c0472a4c49dffc43cb4dbec6a25435d2cb0593f39488b30483a02b9a86a69613fa6bbf43abeac2143eb626961826')
+
+build() {
+  cd $_name-$pkgver
+  export PDM_PEP517_SCM_VERSION=$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 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
+}

Reply via email to