summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 88f56359d86390ab730a905eafc72c9207f6e03b (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-perscache
_name=${pkgname#python-}
pkgver=0.6.1
pkgrel=1
pkgdesc="An easy to use decorator for persistent memoization"
arch=(any)
url="https://github.com/leshchenko1979/perscache"
license=(MIT)
depends=(
  python
  python-beartype
  python-cloudpickle
  python-gcsfs
  python-icontract
  python-pandas
  python-pyarrow
  python-yaml
)
makedepends=(
  git
  python-build
  python-installer
  python-pbr
  python-setuptools
  python-wheel
)
checkdepends=(
  python-aiohttp
  python-pytest
)

_commit=8cafd10b3b41c7299b53f2c06062911c271b4138 # git rev-parse "$pkgver"
source=("git+$url.git#commit=$_commit")
sha256sums=('SKIP')

_archive="$_name"

pkgver() {
  cd "$_archive"

  git describe --tags
}

build() {
  cd "$_archive"

  python -m build --wheel --no-isolation
}

check() {
  cd "$_archive"

  pytest
}

package() {
  cd "$_archive"

  python -m installer --destdir="$pkgdir" dist/*.whl

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