summaryrefslogtreecommitdiff
path: root/pcr/python-pyspf/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/python-pyspf/PKGBUILD')
-rw-r--r--pcr/python-pyspf/PKGBUILD45
1 files changed, 20 insertions, 25 deletions
diff --git a/pcr/python-pyspf/PKGBUILD b/pcr/python-pyspf/PKGBUILD
index fd1e4a65e..13376cc9a 100644
--- a/pcr/python-pyspf/PKGBUILD
+++ b/pcr/python-pyspf/PKGBUILD
@@ -1,44 +1,39 @@
# Maintainer: Luke Shumaker <lukeshu@parabola.nu>
-# Maintainer (AUR): Hao Zhang <hao at hao-zhang com>
-# Contributor (AUR): Rich Li <rich at dranek com>
-# Contributor (AUR): Samed Beyribey <ras0ir AT eventualis DOT org>
+# Maintainer (aur): Hao Zhang <hao at hao-zhang com>
+# Contributor: Rich Li <rich at dranek com>
+# Contributor: Samed Beyribey <ras0ir AT eventualis DOT org>
pkgname=python-pyspf
+_pkgname=${pkgname#python-}
pkgver=2.0.14
-pkgrel=2
+pkgrel=3
pkgdesc="Python implementation of the Sender Policy Framework (SPF) protocol"
arch=('any')
-url="https://pypi.python.org/pypi/pyspf"
+url="https://pypi.python.org/pypi/${_pkgname}"
license=('PSF')
-makedepends=('python-setuptools')
-depends=('python-py3dns' 'python')
+makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
+depends=('python-py3dns')
+checkdepends=('python-yaml' 'python-authres')
optdepends=('python-authres: Return RFC 5451 Authentication Results headers')
-source=("https://files.pythonhosted.org/packages/d4/dc/5b3838ff90474e21fe0914920c53430f73402e07d6598ea228e61b74963e/pyspf-$pkgver.tar.gz")
+source=("https://files.pythonhosted.org/packages/d4/dc/5b3838ff90474e21fe0914920c53430f73402e07d6598ea228e61b74963e/${_pkgname}-$pkgver.tar.gz")
sha256sums=('57a7ef01bda090173aafb6af0106251686ed73f03db4e911fcd34c57fc347186')
-_version_constraint() # (dep_pkgname)
-{
- local dep_pkgname=$1
- local version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1)
- version=${version%-*}
- local version_inc=${version%.*}.$(( ${version##*.} + 1 ))
-
- echo -n "${dep_pkgname}>=${version}" "${dep_pkgname}<${version_inc}"
-}
-
-
build() {
- cd "$srcdir/pyspf-$pkgver"
+ cd "$_pkgname-$pkgver"
+ python -m build --wheel --no-isolation
+}
- python setup.py build
+check() {
+ cd "$_pkgname-$pkgver/test"
+ PYTHONPATH=../build/lib python testspf.py
}
package() {
- depends+=( $(_version_constraint 'python') )
-
- cd "$srcdir/pyspf-$pkgver"
+ _python_version=$(pacman -S --print-format='%v' python|cut -d- -f1|cut -d. -f1,2)
+ depends+=("python>=${_python_version}" "python<${_python_version%.*}.$(( ${_python_version##*.} + 1 ))")
- python setup.py install --root="$pkgdir" --optimize=1
+ cd "$_pkgname-$pkgver"
+ python -m installer --destdir="$pkgdir" dist/*.whl
}