summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO13
-rw-r--r--CHANGES76
-rw-r--r--PKGBUILD50
3 files changed, 31 insertions, 108 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a6f857a79aa8..285170c1035f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,20 @@
pkgbase = python-captcha
pkgdesc = Library that generates audio and image CAPTCHAs
- pkgver = 0.4
- pkgrel = 2
+ pkgver = 0.5.0
+ pkgrel = 1
url = https://github.com/lepture/captcha
- changelog = CHANGES
arch = any
- license = BSD
- checkdepends = python-nose
+ license = custom:BSD-3-clause
+ checkdepends = python-pytest
checkdepends = python-wheezy-captcha
- makedepends = git
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-wheel
+ makedepends = git
depends = python-pillow
optdepends = python-wheezy-captcha
- source = python-captcha::git+https://github.com/lepture/captcha#commit=a666f57?signed
+ source = captcha::git+https://github.com/lepture/captcha#commit=35364f1?signed
validpgpkeys = 72F8E895A70CEBDF4F2ADFE07E55E3E0118B2B4C
sha256sums = SKIP
diff --git a/CHANGES b/CHANGES
deleted file mode 100644
index c143312f36ad..000000000000
--- a/CHANGES
+++ /dev/null
@@ -1,76 +0,0 @@
-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.
diff --git a/PKGBUILD b/PKGBUILD
index df7df7814619..3092ee0a61a3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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}"
}