summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMark Wagie2024-02-12 09:13:54 -0700
committerMark Wagie2024-02-12 09:13:54 -0700
commit2edb6e2f0d0783961c3889cc79f2017a37537694 (patch)
tree3b7a45fbd25cad6432733e4d40d025c55468e7e0 /PKGBUILD
parentfa0e414e5d9ce49e36d940a2b8ecf2c6baa9186e (diff)
downloadaur-2edb6e2f0d0783961c3889cc79f2017a37537694.tar.gz
adopt package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 14 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index bd55ef9481c0..2f15427fcdf7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,29 @@
-# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Carlos Aznarán <caznaranl@uni.pe>
-
pkgname=python-nanoid
-_pkg=py-nanoid
+_name=${pkgname#python-}
pkgdesc="A tiny, secure, URL-friendly, unique string ID generator for Python"
pkgver=2.0.0
-pkgrel=2
-_commit='99e5b478c450f42d713b6111175886dccf16f156'
+pkgrel=3
arch=('any')
url="https://github.com/puyuan/py-nanoid"
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
-checkdepends=('python-pytest')
-source=("$pkgname-$pkgver.tar.gz::$url/archive/$_commit.tar.gz")
-sha256sums=('875d3ddbb00359e408110b0e2ee98183ccdd942d6277576b4b528f02d3279cf5')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-$pkgver.tar.gz"
+ 'https://raw.githubusercontent.com/puyuan/py-nanoid/master/LICENSE')
+sha256sums=('5a80cad5e9c6e9ae3a41fa2fb34ae189f7cb420b2a5d8f82bd9d23466e4efa68'
+ '1aca51d22bea4295ae532076d9dbb9944712e853e41aac5e5f2c99309d1f0466')
build() {
- cd "$_pkg-$_commit"
- python -m build --wheel --no-isolation
-}
-
-check() {
- cd "$_pkg-$_commit"
- pytest -x
+ cd "${_name}-$pkgver"
+ python -m build --wheel --no-isolation
}
package() {
- cd "$_pkg-$_commit"
- python -m installer --destdir "$pkgdir" dist/*.whl
- local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
- install -dv "$pkgdir/usr/share/licenses/$pkgname/"
- ln -sv "$_site/nanoid-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
+ cd "${_name}-$pkgver"
+ python -m installer --destdir "$pkgdir" dist/*.whl
+
+ install -Dm644 "$srcdir/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
}