# Maintainer: Andrew Crerar <crerar@archlinux.org>
# Contributor: Kevin Azzam <aur@azz.am>
# Contributor: David Runge <dave@sleepmap.de>

pkgname=python-dotenv
pkgver=1.2.1
pkgrel=1
pkgdesc="Get and set values in your .env file in local and production servers"
arch=('any')
url="https://github.com/theskumar/python-dotenv/"
license=('BSD')
depends=('python-click')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
optdepends=('ipython: ipython support')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/theskumar/python-dotenv/archive/v${pkgver}.tar.gz")
b2sums=('a9109c1a2d5376502732aea45b28ff864b50fcc17d2b6083535ab7e96a6176f35a15cde0725bd58496d9e4f5899c0638184c4e2a7dc6cedf0240b2cc0074a20e')

build() {
    cd "${pkgname}-${pkgver}"
    python -m build --wheel --no-isolation
}

package() {
    cd "${pkgname}-${pkgver}"

    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
