summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abs/core/python_modules/python-pycparser/PKGBUILD52
-rw-r--r--abs/core/python_modules/python-pycparser/__changelog1
2 files changed, 29 insertions, 24 deletions
diff --git a/abs/core/python_modules/python-pycparser/PKGBUILD b/abs/core/python_modules/python-pycparser/PKGBUILD
index 6b36524..621a643 100644
--- a/abs/core/python_modules/python-pycparser/PKGBUILD
+++ b/abs/core/python_modules/python-pycparser/PKGBUILD
@@ -1,53 +1,59 @@
# $Id$
-# Maintainer: Felix Yan <felixonmars@gmail.com>
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Justin Dray <justin@dray.be>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: lang2 <wenzhi.liang@gmail.com>
pkgbase=python-pycparser
-pkgname=(python2-pycparser)
-pkgver=2.10
-pkgrel=4
+pkgname=(python-pycparser python2-pycparser)
+pkgver=2.18
+pkgrel=1
pkgdesc='C parser and AST generator written in Python'
url='https://github.com/eliben/pycparser'
-makedepends=('python2-ply' 'git')
+makedepends=('python-ply' 'python2-ply' 'python-setuptools' 'python2-setuptools')
arch=('any')
license=('BSD')
-source=('https://github.com/eliben/pycparser/archive/release_v2.10.zip')
-sha256sums=('1217244f882c330782f4762a1fb37cef21a929ce0123ac388e7e367c35ddbae3')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/eliben/pycparser/archive/release_v$pkgver.tar.gz")
+sha512sums=('76426b000ed601a8e90a1eda34374b62acdf51dcf2048881ca0d4ebc3310e25728905c2f6843dd363d497b7cf0fd8311dab6c0de74f4a5c2f25d3b1d488f082a')
prepare() {
- cp -r pycparser-release_v${pkgver}{,-py2}
+ cp -a pycparser-release_v$pkgver{,-py2}
}
build() {
-# cd pycparser-release_v${pkgver}
-# python setup.py build
-
-# cd pycparser
-# python _build_tables.py
+ cd "$srcdir"/pycparser-release_v$pkgver
+ python setup.py build
+ cd pycparser
+ python _build_tables.py
- cd "$srcdir/pycparser-release_v${pkgver}-py2"
+ cd "$srcdir"/pycparser-release_v$pkgver-py2
python2 setup.py build
-
cd pycparser
python2 _build_tables.py
}
-#package_python-pycparser() {
-# depends=('python-ply')
+check() {
+ cd "$srcdir"/pycparser-release_v$pkgver
+ python tests/all_tests.py
-# cd pycparser-release_v${pkgver}
+ cd "$srcdir"/pycparser-release_v$pkgver-py2
+ python2 tests/all_tests.py
+}
-# python setup.py install --root="$pkgdir" --optimize=1
-# install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-#}
+package_python-pycparser() {
+ depends=('python-ply')
+
+ cd pycparser-release_v$pkgver
+
+ python 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
+ cd pycparser-release_v$pkgver-py2
python2 setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
diff --git a/abs/core/python_modules/python-pycparser/__changelog b/abs/core/python_modules/python-pycparser/__changelog
deleted file mode 100644
index 488d3cf..0000000
--- a/abs/core/python_modules/python-pycparser/__changelog
+++ /dev/null
@@ -1 +0,0 @@
-PKGBUILD: rm py 3 stuff