diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-01 18:39:19 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-01 18:42:55 +0200 |
commit | d54e1cb893640010a268c52261b4a36f796cdba0 (patch) | |
tree | 2d11fce306f510ff8620918bf0b52088684b2718 /main | |
parent | 02aab308049c4be35408eaca58b3b18dc2f01063 (diff) | |
download | aports-d54e1cb893640010a268c52261b4a36f796cdba0.tar.bz2 aports-d54e1cb893640010a268c52261b4a36f796cdba0.tar.xz |
main/py-cryptography: fix dependencies
Avoid needless installing of both python deps variants when user has
both Pythons installed.
Diffstat (limited to 'main')
-rw-r--r-- | main/py-cryptography/APKBUILD | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/main/py-cryptography/APKBUILD b/main/py-cryptography/APKBUILD index 757ef70fb7..27d61dae31 100644 --- a/main/py-cryptography/APKBUILD +++ b/main/py-cryptography/APKBUILD @@ -12,8 +12,8 @@ depends="py-cffi py-idna py-asn1 py-six" makedepends="python2-dev python3-dev py-setuptools libffi-dev openssl-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" -builddir="$srcdir"/$_pkgname-$pkgver build() { cd "$builddir" python2 setup.py build || return 1 @@ -25,22 +25,24 @@ package() { } _py() { - local python=$1 - pkgdesc="$pkgdesc - $python" + local python="$1" + pkgdesc="$pkgdesc (for $python)" arch="all" install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" $python setup.py install --prefix=/usr \ --root="$subpkgdir" --optimize=1 || return 1 } _py2() { - _py python2 + depends="${depends//py-/py2-} py2-ipaddress py2-enum34" replaces="$pkgname" - depends="$depends py2-ipaddress py2-enum34" + _py python2 } _py3() { + depends="${depends//py-/py3-}" _py python3 } |