diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-09 06:06:57 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-12-27 13:27:38 +0200 |
commit | 476ec59a9e2b9dbc4c786bfba70a14d82418c4a3 (patch) | |
tree | 62c0e55e0558e0735478277d976023f3119d2d3f /testing | |
parent | 555a2da26e60badeee5b607d285e6427ef0b9d90 (diff) | |
download | aports-476ec59a9e2b9dbc4c786bfba70a14d82418c4a3.tar.bz2 aports-476ec59a9e2b9dbc4c786bfba70a14d82418c4a3.tar.xz |
testing/py-botocore: more standard python packaging
Diffstat (limited to 'testing')
-rw-r--r-- | testing/py-botocore/APKBUILD | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/testing/py-botocore/APKBUILD b/testing/py-botocore/APKBUILD index 5152a32e71..e9e4cf8a02 100644 --- a/testing/py-botocore/APKBUILD +++ b/testing/py-botocore/APKBUILD @@ -1,46 +1,51 @@ # Maintainer: Valery Kartel <valery.kartel@gmail.com> # Contributor: Valery Kartel <valery.kartel@gmail.com> pkgname=py-botocore +_pkgname=${pkgname#py-} pkgver=1.4.85 pkgrel=0 -_python="2 3" -_pyname=${pkgname#py-} pkgdesc="The low-level, core functionality of Boto3" url="https://github.com/boto/boto" arch="noarch" -license="apache2" +license="ASL 2.0" depends="py-dateutil py-jmespath" depends_dev="" -makedepends="py-setuptools" -install="" -subpackages="" -source="$_pyname-$pkgver.tar.gz::https://github.com/boto/$_pyname/archive/$pkgver.tar.gz" -for v in $_python; do - makedepends="$makedepends python$v-dev" - subpackages="$subpackages py$v-$_pyname:package" -done -builddir="$srcdir"/$_pyname-$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" - for v in $_python; do - python$v setup.py build || return 1 - done + python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - local v=${subpkgname:2:1} - if [ "$v" ]; then - cd "$builddir" - pkgdesc="$pkgdesc (for python$v)" - depends="${depends//py-/py$v-} python$v" - [ "$v" == "2" ] && replaces=$pkgname - install_if="$pkgname=$pkgver-r$pkgrel python$v" - python$v setup.py install --prefix=/usr --root="$subpkgdir" || return 1 - else - mkdir -p "$pkgdir" - fi + mkdir -p "$pkgdir" } -md5sums="b137db3b4c6b0b961d2bf6b40a4a9b3d botocore-1.4.85.tar.gz" -sha256sums="2687f27fa0a9540ada4a1b82c5a6657ed5e03fb0eebc6b20adbe9db256a70a49 botocore-1.4.85.tar.gz" -sha512sums="0b5f6edaa5b6d67bccb18523b14d80ead79a1274f49667c30d7d7dc7361d7c4124c3c1336b37fb6bebf0eb0b17ebb6d067ec0621f9da2a7705979f427068849c botocore-1.4.85.tar.gz" + +_py2() { + replaces="$pkgname" + depends="${depends//py-/py2-}" + _py python2 +} + +_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="ff18b88472d96b8aaa3fd98b6592f349 botocore-1.4.85.tar.gz" +sha256sums="329155bfe2f5efb1fb0421cbc2a9a2563698828136f91712fa9f4ccb5be9b3bb botocore-1.4.85.tar.gz" +sha512sums="fd9301df5aa73517570c716c9dea1619da7d7f53a92065e852b36d8b0cfa601215f08f7ec1c631b35038274e91ce7c7955b226df7057b7e38cdf38436d86579f botocore-1.4.85.tar.gz" |