archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-blosc2 / trunk / PKGBUILD
blobb2f931c3971bd01dad3153dbb5dc5bdf899c3a38
1 # Maintainer:
3 _pyname=blosc2
4 pkgname=python-$_pyname
5 pkgver=2.2.2
6 pkgrel=1
7 pkgdesc='Wrapper for the blosc2 compressor'
8 arch=(x86_64)
9 url='https://github.com/Blosc/python-blosc2'
10 license=(BSD)
11 depends=(blosc2 python-py-cpuinfo python-msgpack python-ndindex python-rich)
12 makedepends=(python-build python-installer python-setuptools python-scikit-build cmake cython ninja python-numpy)
13 checkdepends=(python-pytest)
14 source=(https://github.com/Blosc/python-blosc2/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
15 sha256sums=('8808e6d04ba97cdc298c72dacacc16bb675d94cdaac6fa73c5bbd81842740069')
17 prepare() {
18   cd $pkgname-$pkgver
19   sed -e 's|, \"cmake\", \"ninja\", \"oldest-supported-numpy\"||' -i pyproject.toml
22 build() {
23   cd $pkgname-$pkgver
24   export CMAKE_ARGS="-DUSE_SYSTEM_BLOSC2=ON"
25   python -m build --wheel --no-isolation
28 check() {
29   cd $pkgname-$pkgver
30   python -m venv --system-site-packages test-env
31   test-env/bin/python -m installer dist/*.whl
32   test-env/bin/python -m pytest -v
35 package() {
36   cd $pkgname-$pkgver
37   python -m installer --destdir="$pkgdir" dist/*.whl
38   install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname