aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-openssl/APKBUILD
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-07-25 13:39:57 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-07-25 13:39:57 +0000
commit7bc0d04121f8b2c22e08f0b035eb983edf19f59c (patch)
treef8a9a0811beb2062605ea569b9ab5d18c9849a36 /main/py-openssl/APKBUILD
parent035b61e2cb4a28a9c1b5702e56c923824a3275b3 (diff)
downloadaports-7bc0d04121f8b2c22e08f0b035eb983edf19f59c.tar.bz2
aports-7bc0d04121f8b2c22e08f0b035eb983edf19f59c.tar.xz
main/py-openssl: added support for python3.Created subpackages for py2 and py3
Diffstat (limited to 'main/py-openssl/APKBUILD')
-rw-r--r--main/py-openssl/APKBUILD57
1 files changed, 35 insertions, 22 deletions
diff --git a/main/py-openssl/APKBUILD b/main/py-openssl/APKBUILD
index 4084291a2e..900bff70c9 100644
--- a/main/py-openssl/APKBUILD
+++ b/main/py-openssl/APKBUILD
@@ -1,39 +1,52 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-openssl
-pkgver=0.15.1
+_pkgname=${pkgname/py-/}
+pkgver=16.0.0
pkgrel=0
pkgdesc="Python wrapper module around the OpenSSL library"
url="http://pyopenssl.sourceforge.net/"
arch="noarch"
license="ASL 2.0"
-depends="python"
+depends=""
depends_dev=""
-makedepends="openssl-dev python-dev py-setuptools"
+makedepends="openssl-dev python2-dev py-setuptools python3-dev"
install=""
-subpackages=""
+subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/p/pyOpenSSL/pyOpenSSL-$pkgver.tar.gz"
-
-_builddir="$srcdir"/pyOpenSSL-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir"/pyOpenSSL-$pkgver
build() {
- cd "$_builddir"
- python setup.py build || return 1
+ cd "$builddir"
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ cd "$builddir"
+ python2 setup.py install --root=$pkgdir/ --optimize=1 || return 1
+ python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))')
+
+ mkdir -p "$subpkgdir"${dir}
+ mv "$pkgdir"${dir}/* "$subpkgdir"${dir}
+}
+
+_py2() {
+ _py python2
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
}
-md5sums="f447644afcbd5f0a1f47350fec63a4c6 pyOpenSSL-0.15.1.tar.gz"
-sha256sums="f0a26070d6db0881de8bcc7846934b7c3c930d8f9c79d45883ee48984bc0d672 pyOpenSSL-0.15.1.tar.gz"
-sha512sums="bd204f40c9583a8580cff28b061f02ea772fdda3965dab6ac9e3f8c3b98792bea87b6de76494f7ce81e1ddcc76019432a9ffa3bcd55c5adb063bb639efe62e51 pyOpenSSL-0.15.1.tar.gz"
+d5sums="f447644afcbd5f0a1f47350fec63a4c6 pyOpenSSL-0.15.1.tar.gz"
+md5sums="9587d813dcf656e9f2760e41a3682dc3 pyOpenSSL-16.0.0.tar.gz"
+sha256sums="363d10ee43d062285facf4e465f4f5163f9f702f9134f0a5896f134cbb92d17d pyOpenSSL-16.0.0.tar.gz"
+sha512sums="ba67a34e04e383ab42b619c5d9e73206672d584b0795e1d09c5de7e624bff0e3bd9f9e69d51a92d6a40e4000408ae21d5d2ac281f22aeca2e8681e6fa762a081 pyOpenSSL-16.0.0.tar.gz"