Christoph Reiter a0902f1e21 Use pypi PURLs instead of plain pypi names
This allows us to include a version and we already use PURL
for other things, so might as well remove the pypi special case.

Normalize the names, since that is required for PURLs.
2025-02-16 20:58:55 +01:00

43 lines
1.0 KiB
Bash

# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>
_pyname=hatchling
pkgname=python-hatchling
pkgver=1.27.0
pkgrel=1
pkgdesc="A modern project, package, and virtual env manager (backend)"
arch=('any')
url="https://github.com/pypa/hatch"
msys2_references=(
"purl: pkg:pypi/hatchling"
)
license=('spdx:MIT')
depends=(
'python'
'python-packaging'
'python-pathspec'
'python-pluggy'
'python-editables'
'python-trove-classifiers'
)
makedepends=(
'python-build'
'python-installer'
'python-setuptools'
)
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('971c296d9819abb3811112fc52c7a9751c8d381898f36533bb16f9791e941fd6')
build() {
cd "${_pyname}-${pkgver}"
python -m build --wheel --no-isolation
}
package() {
cd "${_pyname}-${pkgver}"
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"
}