# POWER Maintainer: Alexander Baldeck # Maintainer: Felix Yan pkgname=python-pyaml pkgver=23.12.0 pkgrel=2 pkgdesc="PyYAML-based module to produce pretty and readable YAML-serialized data" url="https://pypi.python.org/pypi/pyaml" license=('WTFPL') arch=(any) depends=('python-yaml') makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel') checkdepends=('python-unidecode') optdepends=('python-unidecode: Needed if same-id objects or recursion is used within serialized data') source=("https://pypi.io/packages/source/p/pyaml/pyaml-$pkgver.tar.gz") sha512sums=('f1f03baf2b0a469ffbe7d6eea806cf7623a28c96221bc710873d548d8f416160bf566f44a3a42ca3572085834889e1dd394fc9bdeefe14fe23177b61573df12c') build() { cd pyaml-$pkgver python -m build --wheel --no-isolation } check() { cd pyaml-$pkgver python -m unittest -v } package() { cd pyaml-$pkgver python -m installer --destdir="$pkgdir" dist/*.whl install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/ # Remove tests python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') rm -r ${pkgdir}/usr/lib/python${python_version}/site-packages/pyaml/tests }