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

46 lines
1.1 KiB
Bash

# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>
_realname=dulwich
pkgname="python-${_realname}"
# Note: 0.22.x requires Rust, so we can't update
pkgver=0.21.7
pkgrel=5
pkgdesc='Pure-Python implementation of the Git file formats and protocols'
arch=('any')
url='https://www.dulwich.io'
msys2_references=(
"purl: pkg:pypi/dulwich"
)
license=('spdx:Apache-2.0 OR GPL-2.0-or-later')
depends=(
'python'
'python-urllib3'
)
makedepends=(
'python-setuptools'
'python-devel'
'gcc'
"python-build"
"python-installer"
)
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('a9e9c66833cea580c3ac12927e4b9711985d76afca98da971405d414de60e968')
prepare(){
cd "${srcdir}/${_realname}-${pkgver}"
}
build() {
cd "${srcdir}/${_realname}-${pkgver}"
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${srcdir}/${_realname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}