testing/py3-cads-api-client: new aport

This commit is contained in:
Iztok Fister Jr. 2024-09-02 14:06:29 +00:00 committed by Patrycja Rosa
parent c931a6d253
commit c3612cb42c

View File

@ -0,0 +1,37 @@
# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-cads-api-client
pkgver=1.3.0
pkgrel=0
pkgdesc="CADS API Python client for developing and testing"
url="https://github.com/ecmwf-projects/cads-api-client"
arch="noarch"
license="Apache-2.0"
depends="py3-attrs py3-multiurl py3-requests py3-responses py3-typing-extensions"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="https://github.com/ecmwf-projects/cads-api-client/archive/v$pkgver/cads-api-client-$pkgver.tar.gz"
builddir="$srcdir/cads-api-client-$pkgver"
build() {
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest -n auto
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
96750037cc39768dea9080525912e64e9e448d2f98f96dd6008456c8bfe4ceb8d56bf4d104230609d5b772e9b99e4e145ea1f0e141e28e84c82de9cd2ea15460 cads-api-client-1.3.0.tar.gz
"