aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-17 12:51:29 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-17 13:06:20 +0000
commitca9a57bfe41f5c919da55c6adabbd9b96e769050 (patch)
treef6015839ad1a045dc34230ee4dd4795b45221b87
parentc4c977f3ea4d5c1fe0caaa0e9dfe1bc7de06dccc (diff)
downloadaports-ca9a57bfe41f5c919da55c6adabbd9b96e769050.tar.bz2
aports-ca9a57bfe41f5c919da55c6adabbd9b96e769050.tar.xz
main/py-idna: moved from community, added py2 and py3 subpackages. Added maintainer
-rw-r--r--main/py-idna/APKBUILD (renamed from community/py-idna/APKBUILD)47
1 files changed, 28 insertions, 19 deletions
diff --git a/community/py-idna/APKBUILD b/main/py-idna/APKBUILD
index 61692c40ee..ee87d0ae13 100644
--- a/community/py-idna/APKBUILD
+++ b/main/py-idna/APKBUILD
@@ -1,40 +1,49 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer:
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-idna
pkgver=2.1
-pkgrel=0
+pkgrel=1
pkgdesc="IDNA 2008 and UTS #46 for Python"
url="https://github.com/kjd/idna"
arch="noarch"
license="BSD"
depends=""
-depends_dev=""
-makedepends="$depends_dev py-setuptools"
+makedepends="python2-dev python3-dev py-setuptools"
install=""
-subpackages=""
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="idna-$pkgver.tar.gz::https://github.com/kjd/idna/archive/v$pkgver.tar.gz"
-_builddir="$srcdir"/idna-$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"/idna-$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
+ 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="$subpkgdir"
+}
+
+_py2() {
+ _py python2
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
}
+
md5sums="df0a50db62bcfcddbef2b5c9d5cd2343 idna-2.1.tar.gz"
sha256sums="25a3dadf365b8cc2c2c262170c5de67c9195f3270cdb47a0ae459b4ebad11914 idna-2.1.tar.gz"
sha512sums="92ddaccd57f8d9cf7b57d7880f8ea3890a32a21369ba56dc713da7235983676698ef2019d6b85381ebc7291088e76c8e33f9697cbeaa7b67edef9115dfcf2189 idna-2.1.tar.gz"