summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4e0f6676c6c85449e7a14365c713bad8e66439ce (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
# Maintainer:  Anton Kudelin <kudelin at proton dot me>

_pyname=sqlalchemy-jsonfield
pkgname=python-$_pyname
pkgver=1.0.1.post0
pkgrel=1
arch=(any)
pkgdesc='Storing dicts at SQL independently from JSON type support'
url='https://github.com/penguinolog/sqlalchemy_jsonfield'
license=(Apache)
depends=(python-sqlalchemy)
makedepends=(python-setuptools python-build python-installer python-wheel)
checkdepends=(python-pytest)
source=($pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz)
sha256sums=('f1187c3da2ecc37e69439f2e1b7cf9e4c56751c0a14ba9b3a949c831e5036896')

build() {
  cd "$srcdir/${_pyname/-/_}-$pkgver"
  python -m build \
    --wheel \
    --no-isolation \
    --skip-dependency-check
}

check() {
  cd "$srcdir/${_pyname/-/_}-$pkgver"

  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl

  test-env/bin/python -m pytest
}

package() {
  cd "$srcdir/${_pyname/-/_}-$pkgver"
  python -m installer \
    --destdir="$pkgdir" \
    --compile-bytecode=2 \
    dist/*.whl
}