summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2dfccd4f2e94315a178a0199e6696c2e8bf21bc7 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Matteo Piccinini (loacker) <matteo.piccinini@gmail.com>
# Contributor: Jonas Witschel <diabonas@archlinux.org>

pkgname=python-matrix-nio
pkgver=0.25.2
pkgrel=4
pkgdesc="Python Matrix client library, designed according to sans I/O principles"
arch=("any")
url="https://github.com/matrix-nio/matrix-nio"
license=("ISC")
depends=(
    'python'
    'python-aiohttp'
    'python-aiofiles'
    'python-h11'
    'python-h2'
    'python-jsonschema'
    'python-unpaddedbase64'
    'python-pycryptodome'
    'python-aiohttp-socks'
)
makedepends=(
    'python-build'
    'python-installer'
    'python-sphinx'
    'python-setuptools'
    'python-wheel'
    'python-poetry-core'
    'tar'
)
checkdepends=(
    'python-aioresponses'
    'python-hpack'
    'python-hyperframe'
    'python-hypothesis'
    'python-faker'
    'mypy'
    'python-mypy_extensions'
    'pre-commit'
    'python-pytest'
    'python-pytest-asyncio'
    'python-pytest-aiohttp'
    'python-pytest-benchmark'
    'python-pytest-cov'
    'python-atomicwrites'
    'python-cachetools'
    'python-peewee'
    'python-olm'
)
optdepends=(
    'python-atomicwrites: end-to-end encryption support'
    'python-cachetools: end-to-end encryption support'
    'python-peewee: end-to-end encryption support'
    'python-olm: end-to-end encryption support'
)
changelog="CHANGELOG.md"
source=("$pkgname-$pkgver.tar.gz::https://api.github.com/repos/${pkgname#python-}/${pkgname#python-}/tarball/refs/tags/$pkgver")
noextract=("$pkgname-$pkgver.tar.gz")
b2sums=('f634d12f0d7e3325a1a8fae1bcc5346caa98009b5766049502daf0113ef8bf9e27a99207e12af80232c9837cae62ba4003a9d30a67929d4dabb8d89937894f60')

prepare() {
    tar zxvf "$pkgname-$pkgver.tar.gz" --strip-components=1 --one-top-level
}

build() {
    cd "$pkgname-$pkgver" || exit
    python -m build --wheel --no-isolation
}

check() {
    cd "$pkgname-$pkgver" || exit
    PYTHONPATH="$PWD/src" pytest --benchmark-disable
}

package() {
    cd "$pkgname-$pkgver" || exit
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -vDm644 README.md -t "$pkgdir/usr/share/$pkgname/"
    install -vDm644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname/"
}