summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-pycparser/PKGBUILD
blob: 6b36524e5224492eba9a4fd64b3abd8af67cc4a6 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $Id$
# Maintainer: 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=(python2-pycparser)
pkgver=2.10
pkgrel=4
pkgdesc='C parser and AST generator written in Python'
url='https://github.com/eliben/pycparser'
makedepends=('python2-ply' 'git')
arch=('any')
license=('BSD')
source=('https://github.com/eliben/pycparser/archive/release_v2.10.zip')
sha256sums=('1217244f882c330782f4762a1fb37cef21a929ce0123ac388e7e367c35ddbae3')

prepare() {
  cp -r 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}-py2"
  python2 setup.py build

  cd pycparser
  python2 _build_tables.py
}

#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

  python2 setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}