summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 16829a67328fba27917a331b874661ac87e90fff (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
# Maintainer: Zhuoyun Wei <wzyboy@wzyboy.org>

pkgname=beanquery
pkgdesc='A customizable light-weight SQL query tool that works on tabular data, including Beancount'
pkgver=0.1.0
pkgrel=5
arch=("any")
url="https://github.com/beancount/beanquery"
license=('GPL')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz")
b2sums=('740590b554b484b73fabfdacd60e9d17e64628230d9949b131645b53adda5c3050739f9df694d251b67b3d611ede83604da10f6a616648795aec6d430dee99ae')
# NOTE: The Python package technically does not require beancount 3.x but it
# provides /usr/bin/bean-query which conflicts with beancount 2.x and so we
# require beancount 3.x here.
# NOTE: The Python package requires 'tatsu >= 5.7.4, < 5.8.0', and the only
# version meets the requirement is 5.7.4 released in 2022. You can build it
# with this PKGBUILD:
# https://gist.github.com/wzyboy/a5acef9bc8e9bfd74f07696b21551c65
depends=("python" "beancount>=3" "python-click" "python-tatsu=5.7.4")
makedepends=("python-build" "python-installer" "python-wheel" "python-setuptools")

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

package() {
  cd "${pkgname}-${pkgver}"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  rm -r ${pkgdir}/usr/lib/python3*/site-packages/docs
}