summaryrefslogtreecommitdiff
path: root/pcr/python-simpleeval/PKGBUILD
blob: 623dc8e1a6e09c07ea917e52014cd18964d80836 (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
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgbase=python-simpleeval
pkgname=('python-simpleeval' 'python2-simpleeval')
pkgver=0.9.2
pkgrel=1
pkgdesc='Simple Safe Extensible Expression Evaluator for Python'
arch=(any)
url="https://pypi.python.org/pypi/simpleeval"
license=('MIT')
makedepends=('python-setuptools' 'python2-setuptools')
source=("https://github.com/danthedeckie/simpleeval/archive/$pkgver.tar.gz")
md5sums=('cdd1693ae2350e428cc7788139e31a61')

prepare() {
  cp -a simpleeval-$pkgver{,-py2}
}

build() {
  cd "$srcdir/simpleeval-$pkgver"
  python setup.py build

  cd "$srcdir/simpleeval-$pkgver-py2"
  python2 setup.py build
}

package_python-simpleeval() {
  depends=('python')

  cd "$srcdir/simpleeval-$pkgver"
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 "LICENCE" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

package_python2-simpleeval() {
  depends=('python2')

  cd "$srcdir/simpleeval-$pkgver-py2"
  python2 setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 "LICENCE" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}