aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-17 13:00:35 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-17 13:06:20 +0000
commit58122e177721f469ceea6f1bf4f3fb53a8fd9477 (patch)
treeeddb81c0ab5076e9397f86a1109aee8e9b1dfca7 /main
parentca9a57bfe41f5c919da55c6adabbd9b96e769050 (diff)
downloadaports-58122e177721f469ceea6f1bf4f3fb53a8fd9477.tar.bz2
aports-58122e177721f469ceea6f1bf4f3fb53a8fd9477.tar.xz
main/py-ipaddress: moved from community, added py2 and py3 subpackages
Diffstat (limited to 'main')
-rw-r--r--main/py-ipaddress/APKBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/main/py-ipaddress/APKBUILD b/main/py-ipaddress/APKBUILD
new file mode 100644
index 0000000000..0afe015537
--- /dev/null
+++ b/main/py-ipaddress/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=py-ipaddress
+pkgver=1.0.16
+pkgrel=1
+pkgdesc="IPv4/IPv6 manipulation library"
+url="https://github.com/phihag/ipaddress"
+arch="noarch"
+license="PSF"
+depends=""
+makedepends="python2-dev python3-dev py-setuptools"
+install=""
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+source="https://files.pythonhosted.org/packages/source/i/ipaddress/ipaddress-$pkgver.tar.gz"
+
+builddir="$srcdir"/ipaddress-$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
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
+}
+
+
+md5sums="1e27b62aa20f5b6fc200b2bdbf0d0847 ipaddress-1.0.16.tar.gz"
+sha256sums="5a3182b322a706525c46282ca6f064d27a02cffbd449f9f47416f1dc96aa71b0 ipaddress-1.0.16.tar.gz"
+sha512sums="50baf15f185b039037eef7b047d5a0ffbe1b335d2d94c218b6a2012ae1ba89c5e5c4f64667d8a623e4e4e7598d90c8a7caa8327ea4c155260ab90384f86a6c89 ipaddress-1.0.16.tar.gz"