blob: c0cb6638eb110f49142b628250c98464e0fff8ac (
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
|
# Maintainer: Darkfish Tech <arch at darkfish dot com dot au>
_pyname=acachecontrol
_upstream_name=acachecontrol
pkgname="python-${_pyname}"
pkgver=0.3.7
pkgrel=1
pkgdesc='Async CacheControl for aiohttp'
arch=('any')
license=('Apache-2.0')
url="https://github.com/MasterSergius/acachecontrol"
depends=(
'python'
'python-aiohttp'
)
makedepends=(
'python-build'
'python-installer'
'python-setuptools'
)
checkdepends=(
'mypy'
'pre-commit'
'python-black'
'python-isort'
'python-flake8'
'python-pytest'
'python-pytest-asyncio'
'python-pytest-cov'
'python-pytest-mock'
'python-pytest-vcr'
)
source=("${_pyname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
b2sums=('b76c3e56e4166a06faa7a509fd4a49d8bd3e1760a212e5133315e6446a0cb0119a20888fbd11efa12f5ed4519bdbc49a399b67aa98a05bb273b1d5f8ca76d3d7')
build() {
cd "$_upstream_name-$pkgver"
python -m build --wheel --no-isolation
}
check() {
cd "$_upstream_name-$pkgver"
python -m venv --system-site-packages test-env
test-env/bin/python -m installer "dist/$_pyname-$pkgver"-*.whl
test-env/bin/python -m pytest -v tests
}
package() {
cd "$_upstream_name-$pkgver"
python -m installer --destdir="$pkgdir" "dist/$_pyname-$pkgver"-*.whl
# Upstream does not provide a license file, so we will create one from the license text in the source code.
#install -Dm644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
# vim:set ts=2 sw=2 et:
|