summaryrefslogtreecommitdiff
path: root/python-asteval/PKGBUILD
blob: 6e7354e2bd3f2ec4c39a86ec8cc60a24d29c4d93 (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
# Contributor: Francois Boulogne <fboulogne at april dot org>
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgname='python-asteval'
_pkgname="${pkgname#*-}"
pkgver=0.9.18
pkgrel=2
pkgdesc='Minimal Python AST Evaluator'
arch=('any')
url='https://newville.github.io/asteval/'
license=('MIT')
depends=(
  'python>=3.8'
  'python<3.9')
makedepends=(
  'python-setuptools')
checkdepends=(
  'python-nose'
  'python-pytest')
source=(
  "${_pkgname}-${pkgver}.tar.gz::https://github.com/newville/${_pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('f2b5b8235fe8e1ca9b071d4f0fd84e5e3f843c819d13211a3111a58724195ecf44e05270da94127239e51ecde28d851dc3e0eaa9005a63a576cfc531250f82b7')

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

check() {
  cd "$srcdir/${_pkgname}-$pkgver"
  nosetests3 tests
}

package(){
  cd "$srcdir/${_pkgname}-$pkgver"
  python setup.py install --root="$pkgdir/" --optimize=1
}