blob: 7517eb37eeb641e5568ba44f3cb3a8156f45dd83 (
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
62
63
64
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
pkgname=python-deal
_pkgname=${pkgname#python-}
pkgver=4.24.4
pkgrel=1
pkgdesc="Design by contract for Python. Write bug-free code. Add a few decorators, get static analysis and tests for free"
arch=(any)
url="https://github.com/life4/deal"
license=(MIT)
depends=(python)
makedepends=(
python-build
python-flit-core
python-installer
python-wheel
)
checkdepends=(
python-astroid
python-docstring-parser
python-hypothesis
python-pytest
python-typeguard
python-urllib3
)
optdepends=(
'python-astroid: for tyupe inference in linter'
# 'python-deal-solver: for formal verification'
'python-hypothesis: for test generation'
'python-pygments: for syntax highlighting in exceptions'
'python-typeguard: for runtime type checking in tests'
# 'python-vaa: for supporting schemes (like marshmallow) as validators'
)
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('4dee672a317d55216083155158617789c3f461b2c59911655e79fdd128bc4277')
_archive="$_pkgname-$pkgver"
build() {
cd "$_archive"
python -m build --wheel --no-isolation
}
check() {
cd "$_archive"
# Deselect failing tests - most are failing due to using CallMemo which was
# removed from typeguard in v4.0.0.
pytest --override-ini="addopts=" \
--deselect tests/test_cli/test_test.py::test_no_violations \
--deselect tests/test_cli/test_test.py::test_print_exception \
--deselect tests/test_doctest.py::test_doctest \
--deselect tests/test_linter/test_extractors/test_exceptions_stubs.py::test_marhsmallow_stubs \
--deselect tests/test_testing.py
}
package() {
cd "$_archive"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
|