diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-08 08:42:54 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-08 23:12:13 +0100 |
commit | da589be8409e9735f379f2e8f6702a9094f64f2a (patch) | |
tree | a21da9fc12f3d90c46cfbeb9203cea6b644a5a74 /main/py-parsing | |
parent | 60fbeacaeddfce45825f87e9823a0a8a0234b607 (diff) | |
download | aports-da589be8409e9735f379f2e8f6702a9094f64f2a.tar.bz2 aports-da589be8409e9735f379f2e8f6702a9094f64f2a.tar.xz |
main/py-parsing: upgrade to 2.1.10 and add py2/py3 subpackages
Diffstat (limited to 'main/py-parsing')
-rw-r--r-- | main/py-parsing/APKBUILD | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/main/py-parsing/APKBUILD b/main/py-parsing/APKBUILD index b55a7ce62a..f6c82840a7 100644 --- a/main/py-parsing/APKBUILD +++ b/main/py-parsing/APKBUILD @@ -1,40 +1,47 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=py-parsing -pkgver=2.1.1 +_pkgname=pyparsing +pkgver=2.1.10 pkgrel=0 pkgdesc="An object-oriented approach to text processing" url="http://pyparsing.wikispaces.com/" arch="noarch" license="MIT" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" -source="http://downloads.sourceforge.net/pyparsing/pyparsing-$pkgver.tar.gz" - -_builddir="$srcdir"/pyparsing-$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 -} +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 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="5ce9096d94f553e2bc1fd366fba65558 pyparsing-2.1.1.tar.gz" -sha256sums="9bae5cd4cbee6da0d7d8d9a1647f5253a3b89652e707647eaf1961f4932ae6c6 pyparsing-2.1.1.tar.gz" -sha512sums="4a725f7a5ff5ea805b18e9c8f342733289da8147bb8c7f905bbdca5553d06b818d055c2b3ac61856b10d29f74ac0d846d0ca95e506b66939ba774ed43f1f7aee pyparsing-2.1.1.tar.gz" +md5sums="065908b92904e0d3634eb156f44cc80e pyparsing-2.1.10.tar.gz" +sha256sums="811c3e7b0031021137fc83e051795025fcb98674d07eb8fe922ba4de53d39188 pyparsing-2.1.10.tar.gz" +sha512sums="21af73d6f479d52746f269c8fbaf90c1107a8aec756d30af8c7c4e6a2ff0ea9659cc07816b7ea19286bc12d43497f5e8e63351453bf18daf6a1cb380a195532e pyparsing-2.1.10.tar.gz" |