summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 099ff226eba4d7f527f97f6a803ad7a6bdc4d999 (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
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Maintainer: Yann Büchau <nobodyinperson@posteo.de>

pkgname=hledger-utils-git
_pkgname=${pkgname%-git}
pkgver=1.12.1.r11.g209cd20
pkgrel=1
pkgdesc='Utilities extending the hledger plaintextaccounting tool'
arch=(any)
url="https://gitlab.com/nobodyinperson/$_pkgname"
license=(GPL)
_pydeps=(asteval
         cycler
         # drawilleplot
         matplotlib
         numpy
         pandas
         psutil
         rich
         scipy)
depends=(hledger
         python
        "${_pydeps[@]/#/python-}")
makedepends=(git
             python-{build,installer,wheel}
             python-setuptools-scm)
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
replaces=(python-hledger-utils-git)
source=("git+$url.git")
sha256sums=('SKIP')

pkgver () {
	cd "$_pkgname"
	git describe --long --tags --abbrev=7 --match="v*" HEAD |
		sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build () {
	cd "$_pkgname"
	python -m build -wn
}

package () {
	cd "$_pkgname"
	python -m installer -d "$pkgdir" dist/*.whl
	local _py3_ver=$(python --version | cut -d " " -f2)
	rm -rf "$pkgdir/usr/lib/python${_py3_ver%.*}/site-packages/tests"
}