summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 67ad5c75b8d13ffc8167af2bff6fab154abe25f4 (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
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
_base=genpy
pkgname=python-${_base}
pkgdesc="AST for Python code generation, in Python"
pkgver=2022.1
pkgrel=1
arch=('x86_64')
url="https://documen.tician.de/${_base}"
license=(MIT)
depends=(python-pytools)
makedepends=(python-setuptools git)
checkdepends=(python-pytest)
source=("git+https://github.com/inducer/${_base}.git?signed#tag=v${pkgver}")
validpgpkeys=('900A958D9A0ACA58B1468F2471AA298BCA171145') # Andreas Kloeckner
sha512sums=('SKIP')

build() {
  cd ${_base}
  python setup.py build
}

check() {
  cd ${_base}
  PYTHONPATH="$PWD/build/lib/${_base}/" python -m pytest
}

package() {
  cd ${_base}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}