desktop/python-pycparser/PKGBUILD
AlmAck 08a66c4024 python3 rebuild for 3.5
new pkg added to fullfill checkdepends
new order file python3.order
2016-03-16 22:36:13 +01:00

62 lines
1.5 KiB
Bash

# Maintainer: Samir Benmendil <samir.benmendil@gmail.com>
# Contributor: Felix Yan <felixonmars@gmail.com>
# Contributor: Justin Dray <justin@dray.be>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: lang2 <wenzhi.liang@gmail.com>
pkgbase=python-pycparser
pkgname=(python3-pycparser python2-pycparser)
pkgver=2.14
pkgrel=1
pkgdesc='C parser and AST generator written in Python'
url='https://github.com/eliben/pycparser'
makedepends=('python3-ply' 'python2-ply' 'git')
arch=('any')
license=('BSD')
source=("https://github.com/eliben/pycparser/archive/release_v$pkgver.zip")
sha256sums=('8612b94df49ce0c69a56b7ba23530e69cfb91bf788cc7fde14e17a099feb4e25')
prepare() {
cp -r pycparser-release_v${pkgver}{,-py2}
}
build() {
cd pycparser-release_v${pkgver}
python3 setup.py build
cd pycparser
python3 _build_tables.py
cd "$srcdir/pycparser-release_v${pkgver}-py2"
python2 setup.py build
cd pycparser
python2 _build_tables.py
}
check() {
cd pycparser-release_v${pkgver}
python3 tests/all_tests.py
cd "$srcdir/pycparser-release_v${pkgver}-py2"
python2 tests/all_tests.py
}
package_python3-pycparser() {
depends=('python3-ply')
cd pycparser-release_v${pkgver}
python3 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python2-pycparser() {
depends=('python2-ply')
cd pycparser-release_v${pkgver}-py2
python2 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}