summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 696e2886e9075d9e8ddb41195090e74460b0351c (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
# Maintainer: Carl Smedstad <carsme@archlinux.org>

pkgname=python-quart-schema
pkgver=0.22.0
pkgrel=1
pkgdesc="Quart extension that provides schema validation and auto-generated API documentation"
arch=(any)
url="https://github.com/pgjones/quart-schema"
license=(MIT)
depends=(
  python
  python-humps
  python-quart
)
makedepends=(
  python-build
  python-installer
  python-pdm-backend
  python-wheel
)
checkdepends=(
  python-hypothesis
  python-msgspec
  python-pydantic
  python-pytest
  python-pytest-asyncio
)
source=("$url/archive/$pkgver/${pkgname#python-}-$pkgver.tar.gz")
sha256sums=('93329ac99ebe020d6ff72a6156ea22e38a6fbfa17e1c655b303347ca9f8de509')

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

check() {
  cd "${pkgname#python-}-$pkgver"
  rm -rf test-env
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl
  test-env/bin/python -m pytest --override-ini="addopts="
}

package() {
  cd "${pkgname#python-}-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}