summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-pyparsing/PKGBUILD
blob: 97da91932f8f851c0c76e7656b6f625db871e05f (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
54
55
56
57
58
59
60
61
62
63
64
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Chris Brannon <cmbrannon79@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
# Contributor: Arvid Ephraim Picciani <aep@exys.org>
# Contributor: Michael Krauss <hippodriver@gmx.net>

pkgname=python-pyparsing
pkgname=('python-pyparsing' 'python2-pyparsing')
pkgver=2.2.0
pkgrel=2
pkgdesc='General parsing module for Python'
arch=('any')
url='http://pyparsing.wikispaces.com/'
makedepends=('python-setuptools' 'python2-setuptools' 'subversion')
license=('MIT')
source=("svn://svn.code.sf.net/p/pyparsing/code/tags/pyparsing_$pkgver")
sha256sums=('SKIP')

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

  # :/
  sed -i '1i#coding=utf-8' pyparsing_$pkgver-py2/src/unitTests.py
}

build() {
  cd "$srcdir"/pyparsing_$pkgver/src
  python setup.py build

  cd "$srcdir"/pyparsing_$pkgver-py2/src
  python2 setup.py build
}

check() {
  export LC_CTYPE=en_US.UTF-8

  cd "$srcdir"/pyparsing_$pkgver/src
  python unitTests.py

  cd "$srcdir"/pyparsing_$pkgver-py2/src
  python2 unitTests.py
}

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

  cd pyparsing_$pkgver/src

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

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

  cd pyparsing_$pkgver-py2/src

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

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