Repository navigation
Expand file tree
/
Copy pathpython-fields.avhb
More file actions
44 lines (39 loc) · 1.48 KB
/
Copy pathpython-fields.avhb
File metadata and controls
44 lines (39 loc) · 1.48 KB
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
# Copyright 2010-2024 Avouch Authors
# Distributed under the terms of the GNU General Public License v2
# Maintainer: Qurban Ullah <[email protected]>
# Contributor: Qurban Ullah <[email protected]>
pkgbase=python-fields
pkgname=python-fields
pkgver=5.0.0
pkgrel=17
arch=('any')
groups=('dev-python')
pkgdesc='A totally different take on container boilerplate'
url='https://github.com/ionelmc/python-fields'
license=('BSD')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-attrs')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/ionelmc/python-fields/archive/v$pkgver.tar.gz"
python310.patch)
sha512sums=('feaba23b98271936d6dae20b1001978483c0fe89ccf217637fac536ae5814c2c02bac1c3ddc2a86dc0d2419a3b3658871018c0ea4b7905e1c2649aa905b8e5a3'
'72876eba870204558d4f1a8216be5e2240406e669929605919b1adeb03a9cf230909d7658c26197189e61bd4005bcb00665c652bff6f14a97cdff881e6b45f80')
prepare() {
cd $pkgname-$pkgver
patch -Np1 -i ../python310.patch
sed -i 's/\[pytest\]/[tool:pytest]/;s/--benchmark-disable//' setup.cfg
}
build() {
cd "$srcdir"/python-fields-$pkgver
python setup.py build
}
check() {
cd "$srcdir"/python-fields-$pkgver
# Drop performance test as it relies on characteristic
PYTHONPATH=src python -m pytest --ignore=tests/test_perf.py tests
}
package() {
cd python-fields-$pkgver
python setup.py install --root "$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}