diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-29 06:46:41 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-07-29 06:46:41 +0000 |
commit | 1643a885a9758ac7f655ed87f34f390f4b5d863c (patch) | |
tree | 3c0af0cae673a2fe8721b8772b3c5d9a45536a04 | |
parent | cde6e74d9e9092e59c63af442ace8a607541205e (diff) | |
download | aports-1643a885a9758ac7f655ed87f34f390f4b5d863c.tar.bz2 aports-1643a885a9758ac7f655ed87f34f390f4b5d863c.tar.xz |
community/py-cryptography: upgrade to 1.4 version
* Improved APKBUILD with support for Python 3
* Added subpackages for py2 and py3
-rw-r--r-- | community/py-cryptography/APKBUILD | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/community/py-cryptography/APKBUILD b/community/py-cryptography/APKBUILD index 80096ee636..9fc2b25159 100644 --- a/community/py-cryptography/APKBUILD +++ b/community/py-cryptography/APKBUILD @@ -2,28 +2,47 @@ # Maintainer: August Klein <amatcoder@gmail.com> pkgname=py-cryptography _pkgname=${pkgname#py-} -pkgver=1.3.2 +pkgver=1.4 pkgrel=0 pkgdesc="A package which provides cryptographic recipes and primitives" url="http://pypi.python.org/pypi/cryptography" -arch="all" +arch="noarch" license="ASL-2.0" depends="" -makedepends="python-dev py-setuptools libffi-dev openssl-dev" -source="https://pypi.io/packages/source/c/$_pkgname/$_pkgname-$pkgver.tar.gz" - +makedepends="python2-dev python3-dev py-setuptools libffi-dev openssl-dev" +subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" +#source="$pkgname-$pkgver.tar.gz::https://github.com/pyca/$_pkgname/archive/$pkgver.tar.gz" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver build() { cd "$builddir" - python setup.py build || return 1 + python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { + mkdir -p "$pkgdir" +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + arch="all" + install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + _py python2 + replaces="$pkgname" +} + +_py3() { + _py python3 } -md5sums="0359190f291824dc8ad9e6d477a607b2 cryptography-1.3.2.tar.gz" -sha256sums="fbaafa8827966dc588ccb00be813d3149fa8de04aec96e418ea0fdd5f0312088 cryptography-1.3.2.tar.gz" -sha512sums="6d63d65c6584167192030e471c007d0cdc3b9ac79763d961578de454ef754e9d9387ba7984b88b6dd9ff44eaa94890bf53b33cc5ff1f0b202006a699f4d47baa cryptography-1.3.2.tar.gz" +md5sums="a9763e3831cc7cdb402c028fac1ceb39 cryptography-1.4.tar.gz" +sha256sums="bb149540ed90c4b2171bf694fe6991d6331bc149ae623c8ff419324f4222d128 cryptography-1.4.tar.gz" +sha512sums="84ac02b3af381da077be77057e387ceb2977da584da7c32ddb953b7f67a101836f16fbfe119dbf430a358141f9867ed6f9b65d5214f6a602e17f988d03a112d9 cryptography-1.4.tar.gz" |