archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-pyliblo / repos / community-x86_64 / PKGBUILD
blobf63ed7ffa19688066aa2d2e454545632932cedc3
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Llewelyn Trahaearn <WoefulDerelict at GMail dot com>
3 # Contributor: SpepS <dreamspepser at yahoo dot it>
5 _name=pyliblo
6 pkgname=python-pyliblo
7 pkgver=0.10.0
8 pkgrel=11
9 pkgdesc='Python wrapper for the liblo OSC library'
10 arch=(x86_64)
11 url="http://das.nasophon.de/pyliblo/"
12 license=(LGPL2.1)
13 depends=(
14   glibc
15   liblo
16   python
18 makedepends=(
19   cython
20   python-build
21   python-installer
22   python-setuptools
23   python-wheel
25 checkdepends=(python-pytest)
26 source=(
27   $_name-$pkgver.tar.gz::https://github.com/dsacre/pyliblo/archive/refs/tags/$pkgver.tar.gz
28   $pkgname-0.10.0-python3.11.patch  # https://github.com/dsacre/pyliblo/issues/29
30 sha512sums=('c475ddfea9abf9e155deed12ab01ff2e585a6ed2946fac8d5017f36e3aee84b294f21cf5d0dd79098a4bd2f7911beed791bed67124cec3fc4bbd5087d42b4eed'
31             '66e1543937a125e72184d49fd7c70dc74f61063a05c7d2026618a0d2778480256c58cb80e23645e96d967b5dfbfc1437862523a898bcacbb24ebba9a09cb7fc6')
32 b2sums=('dc14ab1dd64cdff5946d0e05a871c7cc75be89e8a57b12302cbee3bbeab1e9e1cfedce493fd4dbb6a4ba5a095a8539a4d4b7c9fe04431cf8376812b01bf78001'
33         '4b2fb3672cb1b58697cd73484d622869e34dcbbac95d0cb94c98e0954092b788b43a30af2c180ee69a84621915799209ab75213325a8d61cfb69d4cced368d68')
35 prepare() {
36   patch -Np1 -d $_name-$pkgver -i ../$pkgname-0.10.0-python3.11.patch
39 build() {
40   cd $_name-$pkgver
41   python -m build --wheel --no-isolation
44 check() {
45   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
47   cd $_name-$pkgver
48   python -m installer --destdir=test_dir dist/*.whl
49   export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
50   pytest -vv
53 package_python-pyliblo() {
54   cd $_name-$pkgver
55   python -m installer --destdir="$pkgdir" dist/*.whl
56   install -vDm 644 {NEWS,README} -t "$pkgdir/usr/share/doc/$pkgname/"