Files
MSYS2-packages/python-pyparsing/PKGBUILD
Christoph Reiter a58271b395 Make pkgbase of all packages match the name of the PKGBUILD directory
Similar to https://github.com/Alexpux/MINGW-packages/pull/2878
this adjusts the pkgbase names of all packages to match the directory
name the PKGBUILD is in.

The motivation for this is to provide links to PKGBUILD sources and
git history from the web interface.

The "dwz" directory is deleted as it just contains an older copy of the
elfutils PKGBUILD (elfutils isn't in the repo)
2018-01-28 08:43:40 +01:00

64 lines
1.4 KiB
Bash

# Maintainer: atom2013 <atom.long@hotmail.com>
_realname=pyparsing
pkgbase="python-${_realname}"
pkgname=("python3-${_realname}" "python2-${_realname}")
pkgver=2.2.0
pkgrel=2
pkgdesc='General parsing module for Python'
arch=('any')
url='https://pyparsing.wikispaces.com/'
makedepends=('python3-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() {
# Build python 3 module
cd "$srcdir"/pyparsing_$pkgver/src
python3 setup.py build
# Build python 2 module
cd "$srcdir"/pyparsing_$pkgver-py2/src
python2 setup.py build
}
check() {
export LC_CTYPE=en_US.UTF-8
# Check python3 module
cd "$srcdir"/pyparsing_$pkgver/src
python3 unitTests.py
# Check python2 module
cd "$srcdir"/pyparsing_$pkgver-py2/src
python2 unitTests.py
}
package_python3-pyparsing() {
depends=('python3')
cd pyparsing_$pkgver/src
python3 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: