From 970a49b6646ece1f12c8f7eff37ece814489a51b Mon Sep 17 00:00:00 2001 From: bill-auger Date: Fri, 17 Jan 2020 11:05:04 -0500 Subject: [python-pyspf]: rebuild against latest python --- pcr/python-pyspf/PKGBUILD | 48 +++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'pcr/python-pyspf/PKGBUILD') diff --git a/pcr/python-pyspf/PKGBUILD b/pcr/python-pyspf/PKGBUILD index f2e5794cd..375f04eff 100644 --- a/pcr/python-pyspf/PKGBUILD +++ b/pcr/python-pyspf/PKGBUILD @@ -1,28 +1,44 @@ # Maintainer: Luke Shumaker -# Maintainer (AUR): Rich Li -# Contributor (AUR): Samed Beyribey - -_pkgname=pyspf -pkgname=python-$_pkgname -_basever=2.0.12 -_patchver=t -_pkgver=${_basever}${_patchver} -pkgver=${_basever}.${_patchver} +# Maintainer (AUR): Hao Zhang +# Contributor (AUR): Rich Li +# Contributor (AUR): Samed Beyribey + +pkgname=python-pyspf +pkgver=2.0.14 +pkgrel=1 pkgdesc="Python implementation of the Sender Policy Framework (SPF) protocol" +arch=('any') url="https://pypi.python.org/pypi/pyspf" license=('PSF') -source=("https://pypi.python.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$_pkgver.tar.gz") -md5sums=('c83143ad79074bf8c80235748a8a698f') -pkgrel=5 -arch=('any') -depends=('python-py3dns') makedepends=('python-setuptools') +depends=('python-py3dns' 'python') optdepends=('python-authres: Return RFC 5451 Authentication Results headers') -conflicts=(python2-pyspf) + +source=("https://files.pythonhosted.org/packages/d4/dc/5b3838ff90474e21fe0914920c53430f73402e07d6598ea228e61b74963e/pyspf-$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" + + python setup.py build +} package() { - cd "$srcdir/$_pkgname-${_basever}" + depends+=( $(_version_constraint 'python') ) + + cd "$srcdir/pyspf-$pkgver" python setup.py install --root="$pkgdir" --optimize=1 } -- cgit v1.2.3