diff options
author | Luis Martinez | 2022-08-13 23:13:13 -0500 |
---|---|---|
committer | Luis Martinez | 2022-08-13 23:17:05 -0500 |
commit | 706b066242feb13c0048eebc78e40920262b49f4 (patch) | |
tree | ea5eb1646d9a1c3cc054e39bcb84683bbe96aec5 /PKGBUILD | |
parent | 0b6363c0f1fba0b8eedf934876254ebf1afca0a8 (diff) | |
download | aur-706b066242feb13c0048eebc78e40920262b49f4.tar.gz |
packaging update
* added proper check function for testing
* use git sources for GPG verification
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 40 |
1 files changed, 31 insertions, 9 deletions
@@ -1,18 +1,40 @@ -# Maintainer: Joffrey <j-off@live.fr> +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> +# Contributor: Joffrey <j-off@live.fr> + +## GPG key: https://github.com/lepture.gpg pkgname=python-captcha +_pkg="${pkgname#python-}" pkgver=0.4 -pkgrel=1 -pkgdesc='A captcha library that generates audio and image CAPTCHAs.' +pkgrel=2 +_commit=a666f57 +pkgdesc='Library that generates audio and image CAPTCHAs' arch=('any') url='https://github.com/lepture/captcha' license=('BSD') -makedepends=('python-setuptools') -source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") -sha256sums=('2f8f90d0451a7f5efe1eb60d29a6b82115860e3cedff758e26ae1481f0a86b14') +depends=('python-pillow') +optdepends=('python-wheezy-captcha') +makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel') +checkdepends=('python-nose' 'python-wheezy-captcha') +changelog=CHANGES +source=("$pkgname::git+$url#commit=$_commit?signed") +sha256sums=('SKIP') +validpgpkeys=('72F8E895A70CEBDF4F2ADFE07E55E3E0118B2B4C') ## Hsiaoming Yang + +build() { + cd "$pkgname" + python -m build --wheel --no-isolation +} + +check() { + cd "$pkgname" + nosetests +} package() { - cd "$srcdir/captcha-$pkgver" - install -Dm644 './LICENSE' "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - python './setup.py' install --root="$pkgdir" --optimize=1 + cd "$pkgname" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -d "$pkgdir/usr/share/licenses/$pkgname/" + ln -s "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/" } |