summaryrefslogtreecommitdiff
path: root/python-asteval/PKGBUILD
blob: 1837576f0cf3798a7739284326b9449bd0686287 (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.21
pkgrel=2
pkgdesc='Minimal Python AST Evaluator'
arch=('any')
url='https://newville.github.io/asteval/'
license=('MIT')
checkdepends=(
  'python-nose'
  'python-pytest')
makedepends=(
  'python-setuptools')
depends=(
  'python>=3.9'
  'python<3.10')
source=(
  "${_pkgname}-${pkgver}.tar.gz::https://github.com/newville/${_pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('bc67130b8fa35fb3ec5470b7f82d7f588226d719de04de668322bf3015468c959b2102f48ef33906252c58713eb3cac3d2f62797fe905713866bdfc8fa45c005')

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
}