diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 18:55:18 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-12-27 10:13:38 +0200 |
commit | ca97b96178c3d008facb0bb681414a1e96c3dec6 (patch) | |
tree | f7b5ef278e3640cfd25d1dcbc8674465c916e4ef /testing/py-funcparserlib | |
parent | aad6918eb9e3d1b85a018b23fc62968f419d25f4 (diff) | |
download | aports-ca97b96178c3d008facb0bb681414a1e96c3dec6.tar.bz2 aports-ca97b96178c3d008facb0bb681414a1e96c3dec6.tar.xz |
testing/py-funcparserlib: enable py3
Diffstat (limited to 'testing/py-funcparserlib')
-rw-r--r-- | testing/py-funcparserlib/APKBUILD | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/testing/py-funcparserlib/APKBUILD b/testing/py-funcparserlib/APKBUILD index 33d58695da..13bb529d8c 100644 --- a/testing/py-funcparserlib/APKBUILD +++ b/testing/py-funcparserlib/APKBUILD @@ -3,37 +3,43 @@ pkgname=py-funcparserlib _pkgname=funcparserlib pkgver=0.3.6 -pkgrel=0 +pkgrel=1 pkgdesc="Recursive descent parsing library based on functional combinators" -url="http://code.google.com/p/funcparserlib/" +url="https://github.com/vlasovskikh/funcparserlib" arch="noarch" license="MIT" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="3aba546bdad5d0826596910551ce37c0 funcparserlib-0.3.6.tar.gz" |