summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b7b7707f4a6e0b29e4d2dc0f664c43513550b2e3 (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
# Maintainer: Donald Webster <fryfrog@gmail.com>
# Co-Maintainer: Mark Wagie <mark dot wagie at proton dot me>

pkgname=python-backoff
_name=${pkgname#python-}
pkgver=2.2.1
pkgrel=2
pkgdesc="Python library providing function decorators for configurable backoff and retry"
arch=('any')
url="https://github.com/litl/backoff"
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-poetry-core' 'python-wheel')
checkdepends=('python-pytest-asyncio' 'python-pytest-cov' 'python-responses')
source=("$_name-$pkgver.tar.gz::https://github.com/litl/backoff/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('7b92e74aac38ec49e97ac899c96c882496c7b09cf4235e8da205e62b2c6c001d')

build() {
  cd "$_name-$pkgver"
  GIT_DIR='.' python -m build --wheel --no-isolation
}

check() {
  cd "$_name-$pkgver"
  PYTHONPATH=. pytest --cov-report term-missing --cov backoff tests || :
}

package() {
  cd "$_name-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl

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