Files
MSYS2-packages/python-yaml/PKGBUILD
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

51 lines
1.2 KiB
Bash

# Maintainer: Alexandre Ferreira < alex.jorge.m [at] gmail.com >
_pyname=pyyaml
_realname=yaml
pkgbase=python-${_realname}
pkgname=("python-${_realname}")
pkgver=6.0.2
pkgrel=3
pkgdesc='Python bindings for YAML, using fast libYAML library'
arch=('i686' 'x86_64')
url='https://pyyaml.org/'
msys2_references=(
"anitya: 4123"
"purl: pkg:pypi/pyyaml"
"cpe: cpe:/a:pyyaml:pyyaml"
)
license=('spdx:MIT')
depends=('python' 'libyaml')
makedepends=(
'python-build'
'python-installer'
'cython'
'python-setuptools'
'libyaml-devel'
'python-devel'
'gcc'
)
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e')
build() {
cd "${_pyname}-${pkgver}"
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "${_pyname}-${pkgver}"
python setup.py test
}
package() {
cd "${_pyname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python-${_realname}/COPYING"
install -Dm644 CHANGES README.md -t "${pkgdir}/usr/share/doc/python-${_realname}"
}