aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 09:48:17 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 10:14:50 +0000
commitb7de218bccea8f8c8a02018291315d6d09f1416a (patch)
tree9b291998f10db91745409ae6d4d793b71f8e3fd0
parent6b6c99fed61f7da0b17efbbc2aacc484a82bd3ba (diff)
downloadaports-b7de218bccea8f8c8a02018291315d6d09f1416a.tar.bz2
aports-b7de218bccea8f8c8a02018291315d6d09f1416a.tar.xz
community/py-service_identity: upgrade to 16.0.0, moved from testing, added python3 support, added py2 and py3 subpackage
-rw-r--r--community/py-service_identity/APKBUILD50
-rw-r--r--testing/py-service_identity/APKBUILD43
2 files changed, 50 insertions, 43 deletions
diff --git a/community/py-service_identity/APKBUILD b/community/py-service_identity/APKBUILD
new file mode 100644
index 0000000000..15dc789f7c
--- /dev/null
+++ b/community/py-service_identity/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=py-service_identity
+_pkgname=service_identity
+pkgver=16.0.0
+pkgrel=0
+pkgdesc="Service Identity Verification for pyOpenSSL"
+url="https://service-identity.readthedocs.org/"
+arch="noarch"
+license="MIT"
+depends=""
+makedepends="python2-dev py-setuptools py2-pytest python3-dev py3-pytest"
+install=""
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+source="https://files.pythonhosted.org/packages/source/s/$_pkgname/$_pkgname-$pkgver.tar.gz"
+
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ _py python2
+ depends="py2-asn1 py2-asn1-modules py2-openssl py2-characteristic"
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
+ depends="py3-asn1 py3-asn1-modules py3-openssl py3-characteristic"
+}
+
+md5sums="d52392597b9c44a740abf322bfdb21e6 service_identity-16.0.0.tar.gz"
+sha256sums="0630e222f59f91f3db498be46b1d879ff220955d7bbad719a5cb9ad14e3c3036 service_identity-16.0.0.tar.gz"
+sha512sums="0ffa28b3dece2415a058ec159e4f85f3e86c0de520ed5d6933ec49edca91ccc79a57893ace40d5441455791433828ab55a939e90335dfdee8582627e33a896ae service_identity-16.0.0.tar.gz"
diff --git a/testing/py-service_identity/APKBUILD b/testing/py-service_identity/APKBUILD
deleted file mode 100644
index 0d3bd7baa4..0000000000
--- a/testing/py-service_identity/APKBUILD
+++ /dev/null
@@ -1,43 +0,0 @@
-# Contributor: Francesco Colista <fcolista@alpinelinux.org>
-# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
-pkgname=py-service_identity
-_pkgname=service_identity
-pkgver=14.0.0
-pkgrel=0
-pkgdesc="Service Identity Verification for pyOpenSSL"
-url="https://service-identity.readthedocs.org/"
-arch="noarch"
-license="MIT"
-depends="py-asn1 py-asn1-modules py-openssl py-characteristic"
-depends_dev=""
-makedepends="$depends_dev py-setuptools pytest"
-install=""
-subpackages=""
-source="https://files.pythonhosted.org/packages/source/s/$_pkgname/$_pkgname-$pkgver.tar.gz"
-
-_builddir="$srcdir"/$_pkgname-$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
-}
-
-build() {
- cd "$_builddir"
- python -Walways setup.py test
- python setup.py build || return 1
-}
-
-package() {
- cd "$_builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-md5sums="cea0b0156d73b025ecef660fb51f0d9a service_identity-14.0.0.tar.gz"
-sha256sums="3105a319a7c558490666694f599be0c377ad54824eefb404cde4ce49e74a4f5a service_identity-14.0.0.tar.gz"
-sha512sums="d504ad388defb38a86ca82c8ff9582dbb664a929e4b4ee7f6732b2da5326c33b1764384a8d849972f83ae7800c775daf90c1f3fbc61b8d2c29294f44c7cd36d2 service_identity-14.0.0.tar.gz"