# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
_name=cachecontrol
pkgname=python-cachecontrol
pkgver=0.14.0
pkgrel=3
epoch=1
pkgdesc="Port of the caching algorithms in httplib2 for use with requests session object"
arch=(any)
url="https://github.com/ionrock/cachecontrol"
license=(Apache-2.0)
depends=(
python
python-filelock
python-msgpack
python-requests
python-urllib3
)
makedepends=(
python-build
python-flit-core
python-installer
python-wheel)
#checkdepends=(
# python-cherrypy
# python-pytest
# python-redis
#)
optdepends=(
'python-lockfile: for filecache'
'python-redis: for redis cache'
)
source=($_name-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz)
sha256sums=('159f4341e015d11b16de5b9f86e207cff753d6080642671f4cd09717e34a12a0')
b2sums=('352b417512dd2858ba5d43c72116a6930037adc6fc70f66efbee9c1e4e81c296bf9ebf0e862834311afaff0c66d9bbfc16a35dfe978fdf759e07e993d49a0a71')
build() {
cd $_name-$pkgver
python -m build --wheel --no-isolation
}
#check() {
# local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
# cd $_name-$pkgver
# python -m installer --destdir=test_dir dist/*.whl
# export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
# pytest -vv
#}
package() {
cd $_name-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
}