summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4a3915806db6fb8aec9186e9fab94f1d71e47bab (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
# Maintainer: getzze <getzze at gmail dot com>

pkgname='python-pymemoize'
pkgver=1.0.3
pkgrel=5
pkgdesc="Simple Python cache and memoizing module"
arch=(any)
url="https://github.com/mikeboers/PyMemoize"
license=('BSD')
options=(!emptydirs)
source=("https://github.com/mikeboers/PyMemoize/archive/v${pkgver}.tar.gz")
sha256sums=('21946d8cf60b80f71438256d8376b76375002ecfbb95d792588f22bea79cd0ee')
makedepends=('git' 'python-setuptools')
depends=('python')
optdepends=('python-django' 'python-redis')

prepare() {
  cd "$srcdir/PyMemoize-${pkgver}"
  # patch for python3.10
  sed -id 's#from collections import#from collections.abc import#' memoize/options.py
}

package() {
  cd "$srcdir/PyMemoize-${pkgver}"
  install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  python setup.py install --root="$pkgdir/" --optimize=1
}