diff options
-rw-r--r-- | .SRCINFO | 43 | ||||
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | PKGBUILD | 65 |
3 files changed, 77 insertions, 41 deletions
@@ -1,18 +1,35 @@ pkgbase = python-requests-cache - pkgdesc = Transparent persistent cache for http://python-requests.org/ library. - pkgver = 0.5.0 + pkgdesc = A persistent cache for python requests + pkgver = 1.2.0 pkgrel = 1 - url = https://github.com/reclosedev/requests-cache - arch = x86_64 - license = BSD - makedepends = git - makedepends = python-setuptools - depends = python + url = https://github.com/requests-cache/requests-cache + arch = any + license = custom:BSD-2-clause + checkdepends = python-pytest + checkdepends = python-requests-mock + checkdepends = python-responses + checkdepends = python-timeout-decorator + checkdepends = python-time-machine + checkdepends = python-rich + checkdepends = python-ujson + checkdepends = python-itsdangerous + makedepends = python-build + makedepends = python-installer + makedepends = python-poetry-core + makedepends = python-wheel depends = python-requests - provides = python-requests-cache - conflicts = python2-requests-cache - source = requests-cache-0.5.0.tar.gz::https://github.com/reclosedev/requests-cache/archive/v0.5.0.tar.gz - sha256sums = 7846f008cd09ee1d38b5285bf098f9f0246cd1019d8c519d23184c1616342217 + depends = python-cattrs + depends = python-platformdirs + depends = python-url-normalize + optdepends = python-boto3: Cache backend for Amazon DynamoDB database + optdepends = python-botocore: Interface for Amazon Web Services + optdepends = python-pymongo: Cache backend for MongoDB database + optdepends = python-redis: Cache backend for Redis cache + optdepends = python-bson: for BSON codec + optdepends = python-itsdangerous: for pass trusted data to untrusted environments + optdepends = python-yaml: for bindings yaml support + optdepends = python-ujson: for JSON serializer for improved performance + source = requests-cache-1.2.0.tar.gz::https://github.com/requests-cache/requests-cache/archive/v1.2.0.tar.gz + sha512sums = b198d282cfd656c432d3a63f4d615191ac1ff97c9563e9bd6945e7a78444601108beb47a0f4a79740c7bd6942c3753f025cd52457e87ece7964229799bbb8fa1 pkgname = python-requests-cache - diff --git a/.gitignore b/.gitignore index 123226858644..743531c4d347 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -*.pkg.tar.xz -*.tgz -*.tar.gz -src/ -pkg/
\ No newline at end of file +/src/ +/pkg/ +/*.pkg.* +/*.log +/*.tar.gz @@ -1,30 +1,49 @@ -# Maintainer: Aniket Pradhan <aniket17133[at]iiitd[dot]ac[dot]in> -# Contributer: Roman Haritonov <reclosedev[at]gmail[dot]com> - -_pkgname="requests-cache" -pkgname="python-requests-cache" -pkgver=0.5.0 +# Maintainer: Jordan Cook <JCook83@gmail.com> +# Maintainer: Carlos Aznarán <caznaranl@uni.pe> +# Maintainer: Philipp A. <flying-sheep@web.de> +# Contributor: Benoit Pierre <benoit.pierre@gmail.com> +# Contributor: Simon Legner <Simon.Legner@gmail.com> +# Contributor: Aniket Pradhan <aniket17133[at]iiitd[dot]ac[dot]in> +# Contributor: Roman Haritonov <reclosedev[at]gmail[dot]com> +_base=requests-cache +pkgname=python-${_base} +pkgdesc="A persistent cache for python requests" +pkgver=1.2.0 pkgrel=1 -pkgdesc="Transparent persistent cache for http://python-requests.org/ library." -arch=("x86_64") -url="https://github.com/reclosedev/requests-cache" -license=("BSD") -depends=("python" "python-requests") -makedepends=("git" "python-setuptools") -provides=("python-requests-cache") -conflicts=("python2-requests-cache") -source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/reclosedev/requests-cache/archive/v${pkgver}.tar.gz") -sha256sums=('7846f008cd09ee1d38b5285bf098f9f0246cd1019d8c519d23184c1616342217') +arch=(any) +url="https://github.com/${_base}/${_base}" +license=('custom:BSD-2-clause') +depends=(python-requests python-cattrs python-platformdirs python-url-normalize) +makedepends=(python-build python-installer python-poetry-core python-wheel) +optdepends=('python-boto3: Cache backend for Amazon DynamoDB database' + 'python-botocore: Interface for Amazon Web Services' + 'python-pymongo: Cache backend for MongoDB database' + 'python-redis: Cache backend for Redis cache' + 'python-bson: for BSON codec' + 'python-itsdangerous: for pass trusted data to untrusted environments' + 'python-yaml: for bindings yaml support' + 'python-ujson: for JSON serializer for improved performance' +) +checkdepends=(python-pytest python-requests-mock python-responses python-timeout-decorator + python-time-machine python-rich python-ujson python-itsdangerous) +source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz) +sha512sums=('b198d282cfd656c432d3a63f4d615191ac1ff97c9563e9bd6945e7a78444601108beb47a0f4a79740c7bd6942c3753f025cd52457e87ece7964229799bbb8fa1') build() { - cd "$srcdir/$_pkgname-${pkgver}" - python setup.py build + cd ${_base}-${pkgver} + # Note: set `GIT_CEILING_DIRECTORIES` to prevent poetry + # from incorrectly using a parent git checkout info. + # https://github.com/pypa/build/issues/384#issuecomment-947675975 + GIT_CEILING_DIRECTORIES="${PWD}/.." python -m build --wheel --skip-dependency-check --no-isolation } -package() { - cd "${srcdir}/${_pkgname}-${pkgver}" - python setup.py install --root="$pkgdir/" --optimize=1 --skip-build +check() { + cd ${_base}-${pkgver} + python -m pytest --ignore=tests/integration +} - install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - install -Dm 644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README" +package() { + cd ${_base}-${pkgver} + python -m installer --destdir="${pkgdir}" dist/*.whl + install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" } |