summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2767216e1535322b51fd7eba763ff3f759c8aeff (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
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
# Maintainer: Achmad Fathoni<fathoni.id(at)gmail.com>

pkgname=python-beartype
_pkgname=${pkgname#python-}
pkgver=0.17.2
pkgrel=1
pkgdesc="Unbearably fast near-real-time hybrid runtime-static type-checking in pure Python"
arch=(any)
url="https://github.com/beartype/beartype"
license=(MIT)
depends=(
  python
  python-numpy
  python-typing-extensions
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
checkdepends=(
  mypy
  pyright
  python-nptyping
  python-pytest
  python-sphinx
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('dfe8fc7666c3eb1e35d43b8e9f4ebf7ff88b161411abc6aee964d481fdb8ea95')

_archive="$_pkgname-$pkgver"

build() {
  cd "$_archive"

  python -m build --wheel --no-isolation
}

check() {
  cd "$_archive"

  pytest \
    --deselect beartype_test/a00_unit/a90_claw/a00_core/test_claw_api.py::test_claw_api \
    --deselect beartype_test/a00_unit/a90_claw/a90_hook/test_claw_extraprocess.py::test_claw_extraprocess_executable_submodule \
    --deselect beartype_test/a00_unit/a90_claw/a90_hook/test_claw_extraprocess.py::test_claw_extraprocess_executable_package \
    --deselect beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartype_this_package \
    --deselect beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartype_package \
    --deselect beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartype_packages \
    --deselect beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartype_all \
    --deselect beartype_test/a00_unit/a90_claw/a90_hook/test_claw_intraprocess.py::test_claw_intraprocess_beartyping
}

package() {
  cd "$_archive"

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}