[3/3] gnu: Add python2-ipaddr, a Python-2-only package

Message ID 1464541235-12826-4-git-send-email-h.goebel@crazy-compilers.com
State New
Headers

Commit Message

Hartmut Goebel May 29, 2016, 5 p.m. UTC
  * gnu/packages/python.scm: (python2-ipaddr): New variable..
---
 gnu/packages/python.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
  

Comments

Ludovic Courtès June 1, 2016, 8:47 p.m. UTC | #1
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> * gnu/packages/python.scm: (python2-ipaddr): New variable..

Applied.

> +    (synopsis "IP address manipulation library by Google")

I removed “by Google” since we don’t generally acknowledge authors
here.

Thanks!

Ludo’.
  

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index cda4dd3..8c833ff 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5788,6 +5788,35 @@  IPv6 addresses and networks.  This is a port of the Python 3.3 ipaddress
 module to older versions of Python.")
     (license psfl)))
 
+(define-public python2-ipaddr
+  (package
+    (name "python2-ipaddr")
+    (version "2.1.11")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ipaddr" version))
+       (sha256
+        (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* _
+             (zero? (system* "python" "ipaddr_test.py")))))))
+    (home-page "https://github.com/google/ipaddr-py")
+    (synopsis "IP address manipulation library by Google")
+    (description
+     "Ipaddr is a Python library for creating and manupilating IPv4 and IPv6
+addresses and networks.
+
+For new implementations you may prefer to use the standard module
+@code{ipaddress}, which was introduced in Python 3.3 and backported to older
+versions of Python.")
+    (license asl2.0)))
+
 (define-public python-idna
   (package
     (name "python-idna")