archrelease: copy trunk to community-any
[arch-community.git] / python-matrix-nio / trunk / PKGBUILD
blobcc790219d8588d9e24df3d7c10d42da1264f9468
1 # Maintainer: Jonas Witschel <diabonas@archlinux.org>
2 pkgname=python-matrix-nio
3 pkgver=0.20.1
4 _tag=0b88e54ea5bce594258c4d6ae17aed3b2a63caa1 # git rev-parse "$pkgver"
5 pkgrel=1
6 pkgdesc='Python Matrix client library, designed according to sans I/O principles'
7 arch=('any')
8 url='https://github.com/poljar/matrix-nio'
9 license=('ISC')
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")
21 sha512sums=('SKIP')
22 validpgpkeys=('689A3B5BC6560AB4C99A2A0581314DA807EF4E22') # Damir Jelić (poljar) <poljar@termina.org.uk>
24 pkgver() {
25         cd "${pkgname#python-}"
26         git describe | sed 's/\([^-]*-\)g/r\1/;s/-/./g'
29 prepare() {
30         cd "${pkgname#python-}"
31         # Remove unnecessary dependency version pinning
32         sed -i 's/= "^[0-9.]*"/= "*"/' pyproject.toml
35 build() {
36         cd "${pkgname#python-}"
37         python -m build --wheel --no-isolation
40 check() {
41         cd "${pkgname#python-}"
42         python -m pytest
45 package() {
46         cd "${pkgname#python-}"
47         python -m installer --destdir="$pkgdir" dist/*.whl
48         install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"