1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Justin Dray <justin@dray.be>
3 # Contributor: Alexander Rødseth <rodseth@gmail.com>
4 # Contributor: lang2 <wenzhi.liang@gmail.com>
6 pkgname=python-pycparser
9 pkgdesc='C parser and AST generator written in Python'
10 url='https://github.com/eliben/pycparser'
11 depends=('python-ply')
12 makedepends=('python-setuptools')
15 source=("$pkgname-$pkgver.tar.gz::https://github.com/eliben/pycparser/archive/release_v$pkgver.tar.gz")
16 sha512sums=('b141e14040774ddaae6cd1726b0b2a61bfa76e8bcb5dc25dd99a303c48c7257dd7214cc7704234b0045ccc6a47354f6a7639647d875e1266846659217cc6ea78')
19 cd "$srcdir"/pycparser-release_v$pkgver
22 python _build_tables.py
26 cd "$srcdir"/pycparser-release_v$pkgver
27 python -m unittest discover
31 cd pycparser-release_v$pkgver
33 python setup.py install --root="$pkgdir" --optimize=1
34 install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE