summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5d61a8ec1572c254888ad7e9b5993563400e5067 (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
# Copy from https://gitlab.archlinux.org/archlinux/packaging/packages/python-xxhash/-/blob/3.2.0-2/PKGBUILD
# Maintainer: miryo <miryo@vcup.moe>

# Maintainer: Konstantin Gizdov <arch at kge dot pw>

_pyname=pydal
pkgname="python-${_pyname}-git"
pkgver=v20230521.1.r0.g05557217
pkgrel=1
pkgdesc='A pure Python Database Abstraction Layer'
arch=('any')
url="https://github.com/web2py${pkgname}"
depends=('python')
optdepends=('sqlite' 'mariadb' 'postgresql' 'mssql-server' 'oracle-xe' 'mongodb')
makedepends=('git' 'python-setuptools-scm' 'python-build' 'python-installer' 'python-wheel')
license=('BSD')
conflicts=('python-pydal')
provides=('python-pydal')
source=("${pkgname}::git+https://github.com/web2py/pydal.git")
sha512sums=('SKIP')

pkgver() {
  cd "${srcdir}/${pkgname}"
  git describe --tags --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

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

package() {
  cd "${srcdir}/${pkgname}"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}