summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-ply/PKGBUILD
blob: 3b0d7d7b5e6bb82638f856ed858a3a62c82c115c (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@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Marcin "avalan" Falkiewicz <avalatron@gmail.com>
# Contributor: C Anthony Risinger <anthony@xtfx.me>

pkgbase=python-ply
pkgname=(python-ply python2-ply)
pkgver=3.11
pkgrel=1
pkgdesc='Implementation of lex and yacc parsing tools'
arch=('any')
url='http://www.dabeaz.com/ply/'
license=('BSD')
makedepends=('python-setuptools' 'python2-setuptools')
source=("${url}ply-$pkgver.tar.gz"
        LICENSE)
sha512sums=('37e39a4f930874933223be58a3da7f259e155b75135f1edd47069b3b40e5e96af883ebf1c8a1bbd32f914a9e92cfc12e29fec05cf61b518f46c1d37421b20008'
            '5cea085a23ed260afc9084380c1d59e3942c2385089a8eb2391a89c85cde4df2ceb7eed21bb8c4d0cad5b78e59742da69e4c5c78fd0e223f5c99c56e9296a075')

prepare() {
  cp -a ply-$pkgver{,-py2}
}

check() {
  cd "ply-$pkgver/test"
  python testlex.py
  python testyacc.py

  cd "$srcdir/ply-$pkgver-py2/test"
  python2 testlex.py
  python2 testyacc.py
}

package_python-ply() {
  depends=('python')

  cd "ply-$pkgver"
  python setup.py install --root="$pkgdir"

  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

package_python2-ply() {
  depends=('python2')

  cd "ply-$pkgver-py2"
  python2 setup.py install --root="$pkgdir"

  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: