1 # Maintainer: Jonas Witschel <diabonas@archlinux.org>
2 pkgname=python-matrix-nio
4 _tag=0b88e54ea5bce594258c4d6ae17aed3b2a63caa1 # git rev-parse "$pkgver"
6 pkgdesc='Python Matrix client library, designed according to sans I/O principles'
8 url='https://github.com/poljar/matrix-nio'
10 depends=('python' 'python-aiofiles' 'python-aiohttp' 'python-aiohttp-socks' 'python-future' 'python-h11'
11 'python-h2' 'python-jsonschema' 'python-logbook' 'python-pycryptodome' 'python-unpaddedbase64')
12 makedepends=('git' 'python-build' 'python-installer' 'python-poetry-core')
13 checkdepends=('python-aioresponses' 'python-atomicwrites' 'python-cachetools' 'python-faker' 'python-hpack'
14 'python-hyperframe' 'python-hypothesis' 'python-olm' 'python-peewee' 'python-pytest'
15 'python-pytest-aiohttp' 'python-pytest-asyncio' 'python-pytest-benchmark' 'python-setuptools')
16 optdepends=('python-atomicwrites: end-to-end encryption support'
17 'python-cachetools: end-to-end encryption support'
18 'python-peewee: end-to-end encryption support'
19 'python-olm: end-to-end encryption support')
20 source=("git+$url.git?signed#tag=$_tag")
22 validpgpkeys=('689A3B5BC6560AB4C99A2A0581314DA807EF4E22') # Damir Jelić (poljar) <poljar@termina.org.uk>
25 cd "${pkgname#python-}"
26 git describe | sed 's/\([^-]*-\)g/r\1/;s/-/./g'
30 cd "${pkgname#python-}"
31 # Remove unnecessary dependency version pinning
32 sed -i 's/= "^[0-9.]*"/= "*"/' pyproject.toml
36 cd "${pkgname#python-}"
37 python -m build --wheel --no-isolation
41 cd "${pkgname#python-}"
46 cd "${pkgname#python-}"
47 python -m installer --destdir="$pkgdir" dist/*.whl
48 install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"