summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 586484432f98df5fdc55f2732fb85a88efcd102e (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
# Maintainer: Benjamin Winger <bmw@disroot.org>

_pkgname=RestrictedPython
pkgname=python-restrictedpython
pkgver=5.1
pkgrel=1
pkgdesc="A restricted execution environment for Python to run untrusted code"
provides=('python-restrictedpython')
conflicts=('python-restrictedpython')
arch=(any)
url="https://github.com/zopefoundation/RestrictedPython"
license=(ZPL)
depends=("python")
makedepends=("python" "python-setuptools")
checkdepends=("python-pytest" "python-pytest-mock")
source=("https://github.com/zopefoundation/$_pkgname/archive/$pkgver.tar.gz")
sha512sums=('bd3bdfbd581368c0204543e4f7d0ec2f92e243ba94dee932f7c43e99beb7a857c689b054985fe66d2da36fb29b1fbc7c9234ab13aca382fa57da34d6a5065ee6')

check() {
  cd "$srcdir/$_pkgname-$pkgver"
  # Source files are inside the src directory and the module is not in the PATH when running tests
  mv src/RestrictedPython RestrictedPython
  py.test
  mv RestrictedPython src/RestrictedPython
}

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