diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-09 05:30:18 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-12-27 13:14:26 +0200 |
commit | fedc34755440807f2bcf8b241962d91a64814b2f (patch) | |
tree | 7bdea6768670aaac2f987a80764b4577aec0ba64 /testing/py-jmespath/APKBUILD | |
parent | d68f9f72870201092cdafededc2b1541d20935d8 (diff) | |
download | aports-fedc34755440807f2bcf8b241962d91a64814b2f.tar.bz2 aports-fedc34755440807f2bcf8b241962d91a64814b2f.tar.xz |
testing/py-jmespath: enable py3
Diffstat (limited to 'testing/py-jmespath/APKBUILD')
-rw-r--r-- | testing/py-jmespath/APKBUILD | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/testing/py-jmespath/APKBUILD b/testing/py-jmespath/APKBUILD index 8a04f5d96c..b3ec209e80 100644 --- a/testing/py-jmespath/APKBUILD +++ b/testing/py-jmespath/APKBUILD @@ -3,38 +3,47 @@ pkgname=py-jmespath _pkgname=jmespath pkgver=0.9.0 -pkgrel=0 +pkgrel=1 pkgdesc="JMESPath is a query language for JSON" url="http://jmespath.org" arch="noarch" license="MIT" -depends="python2" -depends_dev= -makedepends="python2-dev py-setuptools" -install= -subpackages="$pkgname-tools" -source="$_pkgname-$pkgver.tar.gz::https://github.com/boto/$_pkgname/archive/$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname.py-$pkgver +makedepends="python2-dev py-setuptools python3-dev" +subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" +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" + depends="${depends//py-/py2-}" + _py python2 } -tools() { - pkgdesc="$pkgdesc (command line tools)" - depends="$pkgname" - arch="noarch" - mkdir -p "$subpkgdir"/usr - mv "$pkgdir"/usr/bin "$subpkgdir"/usr +_py3() { + depends="${depends//py-/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="0b4e773df9b74377b916cb156c2be144 jmespath-0.9.0.tar.gz" -sha256sums="64ba1d91bafef53b730d9eb696aa4a74df3dc5b6ff728c5563069382936da860 jmespath-0.9.0.tar.gz" -sha512sums="123c49184add3a994f4289ca79152234b6723ec4ba10a090d0823f12124925ea50ff8b16d0ea491e7a0505181216faa696442ac2fd0c9b2972c78fd1e42fd850 jmespath-0.9.0.tar.gz" +md5sums="471b7d19bd153ac11a21d4fb7466800c jmespath-0.9.0.tar.gz" +sha256sums="08dfaa06d4397f283a01e57089f3360e3b52b5b9da91a70e1fd91e9f0cdd3d3d jmespath-0.9.0.tar.gz" +sha512sums="c3a707bde5e529554638255a6a6dcf49591ec7573e28d84d34b3c1b8f84d13289ab054818f88b72ac8aee0f1af6ae830cb661f027e90efe9fb9edb4dcf5128c9 jmespath-0.9.0.tar.gz" |