diff options
author | TBK <tbk@jjtc.dk> | 2017-10-28 14:33:57 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-30 08:27:58 +0000 |
commit | bce25dbe37a41314c2ef6d63b8ff7026d419bfee (patch) | |
tree | f40819b949b96b1b960467fd10ed3f253271ae5f /main | |
parent | efcf0e4fa1ec88710194bf8e2863f2a9e2d7aa1e (diff) | |
download | aports-bce25dbe37a41314c2ef6d63b8ff7026d419bfee.tar.bz2 aports-bce25dbe37a41314c2ef6d63b8ff7026d419bfee.tar.xz |
main/py-virtualenv: py3 support; modernize
Diffstat (limited to 'main')
-rw-r--r-- | main/py-virtualenv/APKBUILD | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/main/py-virtualenv/APKBUILD b/main/py-virtualenv/APKBUILD index 06fd9a069e..1029321558 100644 --- a/main/py-virtualenv/APKBUILD +++ b/main/py-virtualenv/APKBUILD @@ -1,4 +1,5 @@ # Contributor: Sam Dodrill <shadowh511@gmail.com> +# Contributor: TBK <alpine@jjtc.eu> # Maintainer: Sam Dodrill <shadowh511@gmail.com> pkgname=py-virtualenv _pkgname=virtualenv @@ -8,21 +9,49 @@ pkgdesc="Virtual Python Environment builder" url="http://www.virtualenv.org/en/latest/" arch="noarch" license="MIT" -depends="python2 py2-pip" -makedepends="python2-dev" +makedepends="python2-dev python3-dev" +#checkdepends="py-tox" +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" +options="!check" # circular dep, this pkg is need as py3 before "!check" can be removed + build() { cd "$builddir" - python2 setup.py build || return 1 + + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + + tox } package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + depends="py2-pip" + _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" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + $python setup.py install --prefix=/usr --root="$subpkgdir" } -md5sums="44e19f4134906fe2d75124427dc9b716 virtualenv-15.1.0.tar.gz" -sha256sums="02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a virtualenv-15.1.0.tar.gz" sha512sums="d7e95b8c017ec076210f30b6fd4bb44be2f7dc0257492c25bb00fee597d3ade34226d03539180f1edaf2d27b361f8efdabb92d3476e13785b890878ee1295cb2 virtualenv-15.1.0.tar.gz" |