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

pkgname=('python-pymemoize' 'python2-pymemoize')
pkgver=1.0.2
pkgrel=1
pkgdesc="Simple Python cache and memoizing module"
arch=(any)
url="https://github.com/EliotBerriot/PyMemoize"
license=('BSD')
options=(!emptydirs)
source=("git+https://github.com/EliotBerriot/PyMemoize#branch=django")
sha256sums=('SKIP')
makedepends=('git' 'python-setuptools' 'python2-setuptools')

pkgver() {
  cd "PyMemoize"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

package_python-pymemoize() {
  depends=('python')
  optdepends=('python-django' 'python-redis')
  cd "$srcdir/PyMemoize"
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  python setup.py install --root="$pkgdir/" --optimize=1
}

package_python2-pymemoize() {
  depends=('python2')
  optdepends=('python2-django' 'python2-redis')
  cd "$srcdir/PyMemoize"
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  python2 setup.py install --root="$pkgdir/" --optimize=1
}