summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1d71f1e19201824e4b932fc125249b03de3a2223 (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
# Maintainer: AlphaJack <alphajack at tuta dot io>

pkgname="beanquery-git"
pkgver=r462.be57a79
pkgrel=1
pkgdesc="A customizable light-weight SQL query tool that works on tabular data, including Beancount"
url="https://github.com/beancount/beanquery"
license=('GPL')
arch=("any")
source=("git+$url")
b2sums=('SKIP')
provides=("beanquery")
conflicts=("beanquery")
depends=("beancount"
         "python-click"
         "python-tatsu-lts")
makedepends=("python-build" "python-installer" "python-wheel" "python-setuptools")

pkgver(){
 cd "${pkgname/-git/}"
 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build(){
 cd "${pkgname/-git/}"
 python -m build --wheel --no-isolation
}

package(){
 cd "${pkgname/-git/}"
 python -m installer --destdir="$pkgdir" dist/*.whl
 # remove environment file /etc/env
 find "$pkgdir/usr/lib" -type d -path "*/site-packages/etc" -exec rm -rf {} +
}