diff options
author | Valery Kartel <valery.kartel@gmail.com> | 2017-12-09 04:21:23 +0200 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2017-12-09 02:22:18 +0000 |
commit | 5a9156a0d94deaa572f92d14786c3405e3016656 (patch) | |
tree | 7adcf0ec1c83fc828bf126ed1f3c1845bea3ec96 /testing/py-coverage | |
parent | d5846d84581dd768db790e681b6aa1b312a32f24 (diff) | |
download | aports-5a9156a0d94deaa572f92d14786c3405e3016656.tar.bz2 aports-5a9156a0d94deaa572f92d14786c3405e3016656.tar.xz |
testing/py-coverage: upgrade to 4.4.2 (#2778)
* testing/py-coverage: upgrade to 4.4.2
add python3 bindings
remove -tools subpackage
* testing/py-coverage: add check() function
Diffstat (limited to 'testing/py-coverage')
-rw-r--r-- | testing/py-coverage/APKBUILD | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/testing/py-coverage/APKBUILD b/testing/py-coverage/APKBUILD index 4a750d76dc..bd5a3f5492 100644 --- a/testing/py-coverage/APKBUILD +++ b/testing/py-coverage/APKBUILD @@ -1,8 +1,8 @@ # Maintainer: Valery Kartel <valery.kartel@gmail.com> # Contributor: Valery Kartel <valery.kartel@gmail.com> pkgname=py-coverage -_pkgname=coverage -pkgver=4.1b2 +_pkgname=${pkgname#py-} +pkgver=4.4.2 pkgrel=0 pkgdesc="Code coverage measurement for Python" url="https://pypi.python.org/pypi/coverage" @@ -10,31 +10,47 @@ arch="all" license="apache2" depends= depends_dev= -makedepends="python2-dev py-setuptools" +makedepends="python2-dev python3-dev py-setuptools" install= -subpackages="$pkgname-tools" +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 +builddir="$srcdir/$_pkgname-$pkgver" build() { - cd "$_builddir" - python2 setup.py build || return 1 + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc ($python)" + depends="$depends $python" + provides="$pkgname-tools" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 + mv "$subpkgdir"/usr/bin/$_pkgname "$subpkgdir"/usr/bin/$_pkgname.py } -tools() { - pkgdesc="$pkgdesc (command line tools)" - depends="$pkgname" - arch="noarch" - mkdir -p "$subpkgdir"/usr - mv "$pkgdir"/usr/bin "$subpkgdir"/usr +_py3() { + _py python3 } -md5sums="e68db75497aed61bc6c28990dbb4d99d coverage-4.1b2.tar.gz" -sha256sums="234f49523c94b0e588a9d2f0af55ec7a85a4c302e917f753eff2a444bc40d04d coverage-4.1b2.tar.gz" -sha512sums="c74a2190553bb12a24ea3e06bc4a50cea3c555e81fb149219a029069925fcd4481ff02c1774c92b9341d15c18b51e8c28713a2e7b50e565c0a07a7a5f6804f7e coverage-4.1b2.tar.gz" +sha512sums="f4c2414c18b983443d9117a23087dc84182d7373a91853cd820a1eb6ae73fd20f0c8647c6f9476f31f26dcf995596375c9ff5bbbb09984ebab9909811323f3a0 coverage-4.4.2.tar.gz" |