aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-ipaddress/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/py-ipaddress/APKBUILD')
-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"