diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -1,40 +1,40 @@ -# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> + +# Contributor: 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=2 -_commit=a666f57 -pkgdesc='Library that generates audio and image CAPTCHAs' -arch=('any') -url='https://github.com/lepture/captcha' -license=('BSD') -depends=('python-pillow') +_base=captcha +pkgname=python-${_base} +pkgver=0.5.0 +pkgrel=1 +_commit=35364f1 +pkgdesc="Library that generates audio and image CAPTCHAs" +arch=(any) +url="https://github.com/lepture/${_base}" +license=('custom:BSD-3-clause') +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") +makedepends=(python-build python-installer python-setuptools python-wheel git) +checkdepends=(python-pytest python-wheezy-captcha) +source=("${_base}::git+$url#commit=$_commit?signed") sha256sums=('SKIP') -validpgpkeys=('72F8E895A70CEBDF4F2ADFE07E55E3E0118B2B4C') ## Hsiaoming Yang +validpgpkeys=('72F8E895A70CEBDF4F2ADFE07E55E3E0118B2B4C') # Hsiaoming Yang <me@lepture.com> build() { - cd "$pkgname" - python -m build --wheel --no-isolation + cd ${_base} + python -m build --wheel --skip-dependency-check --no-isolation } check() { - cd "$pkgname" - nosetests + cd ${_base} + python -m venv --system-site-packages test-env + test-env/bin/python -m installer dist/*.whl + test-env/bin/python -m pytest } package() { - 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/" + cd ${_base} + PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl + install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" } |