1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
6 pkgdesc='Python module for reading & writing Standard MIDI Files'
8 url='https://das.nasophon.de/pysmf/'
9 license=('custom:BSD') # some form of 2-clause BSD
10 depends=('python' 'libsmf')
19 checkdepends=('python-pytest')
20 _commit='84806d212c98f56563eacffb472d4114d2ad42a1'
22 "$pkgname::git+https://github.com/dsacre/pysmf#commit=$_commit"
23 'update-pytest-references.patch'
26 '475231e66e77472418571a585c99f4c347d50a4c29f33c3fe5fbe6ab5602b3ea86ec237fc0454a54b8e70304c3726256e4d267ed024fa987bb8b3034c0686142')
28 '3eb8d25197e68a352819bdef8a57abe17312c5cc938c61bc9a31cc1064949b036eff314e4a21d50daf81a7749a4424ed7371e7fbaab32eed46ef348ddbc7ee73')
33 git describe --tags | sed 's/^v//'
39 python -m build --wheel --no-isolation
45 # update deprecated references to pytest
46 patch -p1 -i "$srcdir/update-pytest-references.patch"
48 local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
50 PYTHONPATH="build/lib.linux-$CARCH-cpython-$python_version:$PYTHONPATH" pytest -v
56 python -m installer --destdir="$pkgdir" dist/*.whl
59 install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" NEWS README
60 cp -vr examples "$pkgdir/usr/share/doc/$pkgname"
63 install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" COPYING