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 | |
parent | 0b6363c0f1fba0b8eedf934876254ebf1afca0a8 (diff) | |
download | aur-706b066242feb13c0048eebc78e40920262b49f4.tar.gz |
packaging update
* added proper check function for testing
* use git sources for GPG verification
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | CHANGES | 76 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 121 insertions, 13 deletions
@@ -1,12 +1,22 @@ pkgbase = python-captcha - pkgdesc = A captcha library that generates audio and image CAPTCHAs. + pkgdesc = Library that generates audio and image CAPTCHAs pkgver = 0.4 - pkgrel = 1 + pkgrel = 2 url = https://github.com/lepture/captcha + changelog = CHANGES arch = any license = BSD + checkdepends = python-nose + checkdepends = python-wheezy-captcha + makedepends = git + makedepends = python-build + makedepends = python-installer makedepends = python-setuptools - source = python-captcha-0.4.tar.gz::https://github.com/lepture/captcha/archive/v0.4.tar.gz - sha256sums = 2f8f90d0451a7f5efe1eb60d29a6b82115860e3cedff758e26ae1481f0a86b14 + makedepends = python-wheel + depends = python-pillow + optdepends = python-wheezy-captcha + source = python-captcha::git+https://github.com/lepture/captcha#commit=a666f57?signed + validpgpkeys = 72F8E895A70CEBDF4F2ADFE07E55E3E0118B2B4C + sha256sums = SKIP pkgname = python-captcha diff --git a/CHANGES b/CHANGES new file mode 100644 index 000000000000..c143312f36ad --- /dev/null +++ b/CHANGES @@ -0,0 +1,76 @@ +Changlog +======== + +The changelog of Captcha. + +Version 0.4 +----------- + +Released on Mar 15, 2022 + +- Fix "'float' object cannot be interpreted as an integer" in Python 3.10.0 + + +Version 0.3 +----------- + +Released on Nov 6, 2018 + +- Support Python 3.5, 3.6, 3.7 + +Version 0.2.4 +------------- + +Released on Jul 14, 2017 + +- Fix compatibility with PIL + +https://github.com/lepture/captcha/pull/18 + +Version 0.2.3 +------------- + +Released on Jun 21, 2017 + +- Fix image width bug +- Fix non-integer error + +Version 0.2.2 +------------- + +Released on Mar 17, 2017 + +- Fix memory leak + + +Version 0.2.1 +------------- + +Released on Oct 4, 2015. + +- Fix AudioCaptcha in Python 3 +- Improve ImageCaptcha + + +Version 0.2 +----------- + +Released on Aug 12, 2015. + +- File format of Image CAPTCHA can be specified + + +Version 0.1.1 +------------- + +Released on Dec 2, 2014, this is a bugfix release. + +- Use cStringIO in Python 2 instead of BytesIO +- Fix random.randint for Python 3 +- Add font_sizes parameters for ImageCaptcha when width is too small + + +Version 0.1 +----------- + +Released on Nov 27, 2014, the very first release. @@ -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/" } |