# Maintainer: Santiago Torres-Arias <santiago @ usualplace>
# Contributor: Kaizhao Zhang <zhangkaizhao@gmail.com>
pkgname=python-hatchling
pkgver=1.21.1
pkgrel=3
pkgdesc="Extensible, standards compliant build backend used by Hatch"
arch=('any')
url="https://github.com/pypa/hatch/tree/master/backend"
_url="https://github.com/pypa/hatch"
license=('MIT')
groups=(python-build-backend)
depends=('python' 'python-packaging' 'python-pathspec' 'python-pluggy'
'python-editables' 'python-trove-classifiers')
makedepends=('python-build' 'python-installer')
_name=${pkgname/python-/}
source=(
"${_url}/archive/refs/tags/${_name}-v${pkgver}.tar.gz"
)
sha256sums=('c931dd012812e8afc29c9d6f9943252960bfc4c81273aa5b2458bdea74ae2b39')
build() {
cd "hatch-${_name}-v${pkgver}/backend"
python -m build --wheel --no-isolation
}
package() {
cd "hatch-${_name}-v${pkgver}/backend"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}