summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8910f7d2321fcd46dc8da3e587206cafc87ed84e (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
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>

pkgname=python-icontract
_name=${pkgname#python-}
pkgver=2.6.6
pkgrel=1
pkgdesc="Design-by-contract in Python3 with informative violation messages and inheritance"
arch=(any)
url="https://github.com/Parquery/icontract"
license=(MIT)
depends=(
  python
  python-asttokens
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
checkdepends=(
  mypy
  python-astor
  python-asyncstdlib
  python-deal
  python-dpcontracts
  python-numpy
  python-pytest
  python-typeguard
)

source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('a4cf6454197af6f12e8a74a86097f0fd71dff20a28d6d96115fe070b4f0aa1a6')

_archive="$_name-$pkgver"

build() {
  cd "$_archive"

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

check() {
  cd "$_archive"

  pytest \
    --deselect tests/test_globals.py::TestSlow::test_slow_set
}

package() {
  cd "$_archive"

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

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