diff options
-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 } |