blob: a5a98eaf67346b2fede47e8f0ea24089e86e6291 (
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
|
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
_name=stamina
pkgname=python-stamina
pkgver=25.2.0
pkgrel=1
pkgdesc="Production-grade retries for Python"
arch=('any')
url="https://github.com/hynek/stamina"
license=('MIT')
depends=('python-tenacity')
makedepends=(
'python-build'
'python-hatchling'
'python-hatch-fancy-pypi-readme'
'python-hatch-vcs'
'python-installer'
'python-wheel')
checkdepends=('python-pytest' 'python-anyio' 'python-dirty-equals')
changelog=CHANGELOG.md
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('780d099b67490d266f591aa14218827e9819b215b31aea18eca0b89fc4e68ab9')
build() {
export SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver"
cd "$_name-$pkgver"
python -m build --wheel --no-isolation
}
check() {
cd "$_name-$pkgver"
echo ":: Tests require a local installation; using a venv instead"
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
test-env/bin/python -P -m pytest
echo ":: Removing test-env"
rm -rf test-env
}
package() {
cd "$_name-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
|