[arch-commits] Commit in python-unearth/repos (2 files)

David Runge dvzrv at gemini.archlinux.org
Thu Jul 21 09:59:47 UTC 2022


    Date: Thursday, July 21, 2022 @ 09:59:46
  Author: dvzrv
Revision: 1254989

archrelease: copy trunk to community-staging-any

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

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

Copied: python-unearth/repos/community-staging-any/PKGBUILD (from rev 1254988, python-unearth/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2022-07-21 09:59:46 UTC (rev 1254989)
@@ -0,0 +1,42 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=unearth
+pkgname=python-unearth
+pkgver=0.5.1
+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-requests-wsgi-adapter)
+optdepends=('python-keyring: use keyring for authentication')
+source=(
+  https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz
+)
+sha256sums=('52c40d4880a4ca3b46f2e388b52b59acc7b30c1a931fea6e3dfd9966c9401507')
+b2sums=('6644045e6f614a8c3120c5ad1f743976eb34915cece2a3df2b47c3d2c4eca34f4e457e06c011b2282d2515ca2c4214f3ef611053ddc5d5c34d2d25fc15005743')
+
+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/"
+}



More information about the arch-commits mailing list