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

39 lines
971 B
Bash

# Maintainer: Jeremy Drake <github@jdrake.com>
_realname=pacdb
pkgbase=python-${_realname}
pkgname=("python-${_realname}")
pkgver=0.1.0
pkgrel=6
pkgdesc="Pure-python module to parse and read pacman sync dbs"
arch=('any')
license=('spdx:MIT')
url="https://github.com/jeremyd2019/pacdb"
msys2_references=(
"purl: pkg:pypi/pacdb"
)
depends=('python'
'python-zstandard')
makedepends=(
"python-poetry-core"
"python-build"
"python-installer"
)
source=("https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('be0b6c3cda82336ca3ab9a6458e273093b88f1ac77af3a39a69a5c427cd77440')
build() {
cd "${srcdir}/${_realname}-${pkgver}"
export GIT_DIR="$(pwd)"
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${srcdir}/${_realname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}