blob: 1d240acdff5a21803bff48688356c31ebf18efc4 (
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
|
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Alexander Bruegmann <mail[at]abruegmann[dot]eu>
pkgname=python-restfly
_pkg="${pkgname#python-}"
pkgver=1.4.7
pkgrel=1
pkgdesc='Simple framework for building RESTful API libraries'
license=('MIT')
arch=('any')
url="https://github.com/librestfly/restfly"
depends=('python-arrow' 'python-box' 'python-requests')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-sphinx' 'python-wheel')
checkdepends=('python-pytest' 'python-responses')
changelog=CHANGELOG.md
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('b3a5a225a7d829180386276b649ec9fef44a98c1b32db24287273e0a69e65022')
build() {
cd "$_pkg-$pkgver"
python -m build --wheel --no-isolation
make -C docs man
}
check() {
cd "$_pkg-$pkgver"
pytest -x --disable-warnings
}
package() {
cd "$_pkg-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dvm644 "docs/_build/man/$_pkg.1" -t "$pkgdir/usr/share/man/man1/"
local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
install -dv "$pkgdir/usr/share/licenses/$pkgname/"
ln -sv "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
}
|