# Contributor: Simon Frankenberger <simon-alpine@fraho.eu>
# Maintainer: Simon Frankenberger <simon-alpine@fraho.eu>
pkgname=py3-dotenv
_pyname=python-dotenv
pkgver=1.0.1
pkgrel=1
pkgdesc="Reads the key-value pair from .env file and adds them to environment variable."
url="https://github.com/theskumar/python-dotenv"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="py3-setuptools"
subpackages="$pkgname-pyc dotenv:cli"
source="$pkgname-$pkgver.tar.gz::https://github.com/theskumar/$_pyname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# running tests requires testing/py3-sh
	PYTHONPATH=build/lib python3 -c "from dotenv import load_dotenv"
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

cli() {
	depends="py3-dotenv py3-click"
	amove usr/bin/dotenv
}

sha512sums="
e7b6dd340136f90251b078cfc87777ef6dc71b0774610321b23478c992a462887e037534f84c0110761fe3b87304308469099c247857f57dbe98ae54013b8b30  py3-dotenv-1.0.1.tar.gz
"
