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

pkgname=python-dotenv
pkgver=1.2.2
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=('7ea3718d11a2f799ea5014dbbc11436de61eeb2422e70f3cf5b62dd81090e25374faf7ac24979d6c13c43635462b31cef36470aba6fb54d374036b85482cbf5c')

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"
}
