# Contributor: Magnus Sandin <magnus.sandin@valitron.se>
# Maintainer: Magnus Sandin <magnus.sandin@valitron.se>
pkgname=py3-ecbdata
pkgver=0.1.1
pkgrel=0
pkgdesc="Allows for easy querying of data from the ECB Data Portal"
url="https://github.com/LucaMingarelli/ecbdata"
arch="noarch"
license="MIT"
depends="
	py3-requests
	py3-pandas
"
makedepends="
	py3-build
	py3-gpep517
	py3-setuptools
	py3-wheel
	python3-dev
"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/71/e1/31c6e66a2ae5dd5cb2b5707da3626fbe868bbb77b4ea9864f181097df1ae/ecbdata-$pkgver.tar.gz"
builddir="$srcdir/ecbdata-$pkgver"

build() {
	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 -v ecbdata/tests/test.py
}

package() {
	python3 -m installer --destdir="$pkgdir" .dist/*.whl
}

sha512sums="
cb9a567b010462248acbbc9663b36c94af81bd137a1bca412b67384fa390010a18bc992dbe0a68579fff084d46cddb4ee2e90f29ac2612ccffca3e45f795a4de  ecbdata-0.1.1.tar.gz
"
