testing/py3-diskcache: upgrade to 4.0.0

This commit is contained in:
Leo 2019-08-27 03:41:34 -03:00
parent 7bc999e4ba
commit 5bba2f669c

View File

@ -1,49 +1,32 @@
# Contributor:
# Maintainer:
pkgname=py-diskcache
pkgver=2.8.3
pkgrel=1
# Contributor:
# Maintainer:
pkgname=py3-diskcache
pkgver=4.0.0
pkgrel=0
pkgdesc="disk caching implementation"
url="http://pypi.python.org/pypi/diskcache/"
options="!check" # test_incr_update_keyerror fails
url="http://www.grantjenks.com/docs/diskcache/"
arch="noarch"
license="MIT"
depends=""
depends_dev=""
makedepends="python2-dev python3-dev py-setuptools"
install=""
subpackages="py2-diskcache:py2 py3-diskcache:py3"
source="https://files.pythonhosted.org/packages/source/d/diskcache/diskcache-$pkgver.tar.gz"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pytest-xdist py3-mock py3-django"
source="$pkgname-$pkgver.tar.gz::https://github.com/grantjenks/python-diskcache/archive/v$pkgver.tar.gz"
builddir="$srcdir"/python-diskcache-$pkgver
builddir="$srcdir"/diskcache-$pkgver
replaces="py-diskcache" # Backwards compatibility
provides="py-diskcache=$pkgver-r$pkgrel" # Backwards compatibility
build() {
cd "$_builddir"
python2 setup.py build
python3 setup.py build
}
check() {
python3 -m pytest
}
package() {
mkdir -p "$pkgdir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
_py() {
local python="$1"
pkgdesc="$pkgdesc ${python#python}"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
py2() {
cd "$builddir"
_py python2
}
py3() {
cd "$builddir"
_py python3
}
sha512sums="d96ac76dfb68cb817febd3f4ed8927a8409c02b13b4112a739528cade40f9a588c732dfc3148392dd12676380c3a2b006ee63b86f30ad70f5d205273003bf23d diskcache-2.8.3.tar.gz"
sha512sums="b9855204784fc641c4be8bf06eff9a968dc6dfae2959f69d140515e78af4f061e58ab5e680a97c5eb560cb337f8f8e4addefbe6e0826854c720106b078fbf252 py3-diskcache-4.0.0.tar.gz"