archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pycapnp / trunk / PKGBUILD
blob65f0f659d2ff17307ebc68347fb5d1221c270b7e
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-pycapnp
4 pkgver=1.3.0
5 _commit=33c453eff788295804c094601b657ec4fdadc6f8
6 pkgrel=3
7 pkgdesc="A cython wrapping of the C++ Cap'n Proto library"
8 url="https://github.com/capnproto/pycapnp"
9 license=(BSD)
10 arch=(x86_64)
11 depends=(gcc-libs glibc python)
12 makedepends=(git capnproto cython python-build python-installer python-pkgconfig python-setuptools python-wheel)
13 checkdepends=(python-pytest)
14 optdepends=('python-jinja: for capnpc-cython')
15 source=(git+https://github.com/capnproto/pycapnp.git#commit=$_commit)
16 sha512sums=('SKIP')
18 build() {
19   cd pycapnp
20   python -m build --wheel --no-isolation
23 check() {
24   cd pycapnp
25   PYTHONPATH="build/lib.linux-$CARCH-cpython-311" pytest
28 package() {
29   depends+=(
30     capnproto libkj.so libkj-async.so libcapnpc.so libcapnp.so libcapnp-rpc.so
31   )
32   cd pycapnp
33   python -m installer --destdir="$pkgdir" dist/*.whl
34   install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/