summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 76ec241008c869b3d3efd22f079807052c0db3dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Maintainer: OSAMC <https://github.com/osam-cologne/archlinux-proaudio>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>

_name=soundfile
pkgname=python-soundfile
pkgver=0.12.1
pkgrel=4
pkgdesc='A Python library to read and write audio files using libsndfile, CFFI and NumPy'
url='https://github.com/bastibe/python-soundfile'
arch=(any)
license=(BSD)
makedepends=(python-build python-installer python-setuptools python-wheel)
depends=(python-cffi libsndfile python-numpy)
checkdepends=(python-pytest)
source=("https://github.com/bastibe/python-soundfile/releases/download/$pkgver/$_name-$pkgver.tar.gz")
sha256sums=('e8e1017b2cf1dda767aef19d2fd9ee5ebe07e050d430f77a0a7c66ba08b8cdae')

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd $_name-$pkgver
  PYTHONPATH="$PWD/build/lib" pytest -v tests
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  # install license
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}