upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-pyzstd / trunk / PKGBUILD
blob7623f22c7e6d7e8efaef024e976158dd49371509
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 pkgname=python-pyzstd
4 _pyname=${pkgname#python-}
5 pkgver=0.15.7
6 pkgrel=2
7 pkgdesc='Python bindings to Zstandard (zstd) compression library'
8 arch=(x86_64)
9 url="https://github.com/animalize/$_pyname"
10 license=(LGPL)
11 depends=(python
12          zstd)
13 makedepends=(python-{build,installer,wheel}
14              python-setuptools-scm)
15 checkdepends=(python-tests)
16 _archive="$_pyname-$pkgver"
17 source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_archive.tar.gz")
18 sha256sums=('55e503f28f5a9d225ce9d0639e3f5b1801bacace5aea926ec2998e73c5150fe7')
20 build() {
21         cd "$_archive"
22         python -m build -wn -C=--build-option=--dynamic-link-zstd
25 check() {
26         cd "$_archive/build"
27         local _pyver=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
28         export PYTHONPATH="$PWD/lib.linux-$CARCH-cpython-$_pyver"
29         python -m unittest discover
32 package() {
33         cd "$_archive"
34         python -m installer -d "$pkgdir" dist/*.whl