From fdc17c0ee008b1c7a7922622335eae37a1566f81 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Fri, 15 Apr 2016 18:54:04 +0000
Subject: pyopenssl: update to 16.0.0

---
 abs/core/python_modules/pyopenssl/PKGBUILD    | 74 +++++++++++++++------------
 abs/core/python_modules/pyopenssl/__changelog |  1 +
 2 files changed, 43 insertions(+), 32 deletions(-)

diff --git a/abs/core/python_modules/pyopenssl/PKGBUILD b/abs/core/python_modules/pyopenssl/PKGBUILD
index 63eeaaf..d99cafa 100644
--- a/abs/core/python_modules/pyopenssl/PKGBUILD
+++ b/abs/core/python_modules/pyopenssl/PKGBUILD
@@ -1,49 +1,59 @@
 # $Id$
-# Maintainer : Ionut Biru<ibiru@archlinux.org>
+# Maintainer : Felix Yan <felixonmars@archlinux.org>
+# Contributor: Ionut Biru <ibiru@archlinux.org>
 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
 
 pkgbase=pyopenssl
 pkgname=('python2-pyopenssl')
-pkgver=0.14
-pkgrel=3
+pkgver=16.0.0
+pkgrel=1
 arch=('any')
 url="http://pypi.python.org/pypi/pyOpenSSL"
 license=('LGPL2.1')
-makedepends=('python2-setuptools' 'openssl' 'python2-six' 'python2-cryptography')
-source=(http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-${pkgver}.tar.gz)
-md5sums=('8579ff3a1d858858acfba5f046a4ddf7')
+makedepends=('openssl' 'python2-setuptools' 'python2-cryptography')
+checkdepends=('python2-pytest-runner')
+source=(http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-$pkgver.tar.gz)
+md5sums=('9587d813dcf656e9f2760e41a3682dc3')
 
-build() {
-    cd "${srcdir}"
-    cp -a "pyOpenSSL-${pkgver}"{,-python2}
+prepare() {
+  cp -a pyOpenSSL-$pkgver{,-py2}
 
-    #build python 3 module
-    cd "pyOpenSSL-${pkgver}"
-#    python setup.py build
+  export LC_CTYPE=en_US.UTF-8
+}
+
+build () {
+  cd "$srcdir"/pyOpenSSL-$pkgver
+#  python setup.py build
+
+  cd "$srcdir"/pyOpenSSL-$pkgver-py2
+  python2 setup.py build
+}
+
+check () {
+  (
+    cd "$srcdir"/pyOpenSSL-$pkgver
+    python setup.py ptr
 
-    #build python 2 module
-    cd ../"pyOpenSSL-${pkgver}-python2"
-    python2 setup.py build
+    cd "$srcdir"/pyOpenSSL-$pkgver-py2
+    python2 setup.py ptr
+  ) || warning "Tests failed due to missing SSLv3_METHOD"
 }
 
-#package_python-pyopenssl(){
-#    pkgdesc="Python3 wrapper module around the OpenSSL library"
-#    depends=('python>=3.3' 'openssl' 'python-six' 'python-cryptography')
-#    replaces=('pyopenssl')
-#    provides=('pyopenssl')
-#    conflicts=('pyopenssl')
+package_python-pyopenssl(){
+  pkgdesc="Python3 wrapper module around the OpenSSL library"
+  depends=('openssl' 'python-six' 'python-cryptography')
 
-#    cd "${srcdir}/pyOpenSSL-${pkgver}"
-#    python setup.py install --root "${pkgdir}" --optimize=1
-#}
+  cd "$srcdir"/pyOpenSSL-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+}
 
 package_python2-pyopenssl(){
-    pkgdesc="Python2 wrapper module around the OpenSSL library"
-    depends=('python2>=2.7' 'openssl' 'python2-six' 'python2-cryptography')
-    replaces=('pyopenssl')
-    provides=('pyopenssl')
-    conflicts=('pyopenssl')
-
-    cd "${srcdir}/pyOpenSSL-${pkgver}-python2"
-    python2 setup.py install --root "${pkgdir}" --optimize=1
+  pkgdesc="Python2 wrapper module around the OpenSSL library"
+  depends=('openssl' 'python2-six' 'python2-cryptography')
+  replaces=('pyopenssl')
+  provides=('pyopenssl')
+  conflicts=('pyopenssl')
+
+  cd "$srcdir"/pyOpenSSL-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
 }
diff --git a/abs/core/python_modules/pyopenssl/__changelog b/abs/core/python_modules/pyopenssl/__changelog
index 488d3cf..3de0e7a 100644
--- a/abs/core/python_modules/pyopenssl/__changelog
+++ b/abs/core/python_modules/pyopenssl/__changelog
@@ -1 +1,2 @@
 PKGBUILD: rm py 3 stuff
+PKGBUILD: move provides/replaces/conflicts to python2-pyopenssl
-- 
cgit v0.12