diff mbox

[08/11] gnu: Add python-publicsuffix.

Message ID 20160822132018.19828-8-david@craven.ch
State New
Headers show

Commit Message

David Craven Aug. 22, 2016, 1:20 p.m. UTC
* gnu/packages/python.scm (python-publicsuffix): New variable.
(python2-publicsuffix): New variable.
---
 gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
diff mbox

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index bcabf22..0c6a1ef 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10120,3 +10120,30 @@  binary or text.")
       (native-inputs
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
+
+(define-public python-publicsuffix
+  (package
+  (name "python-publicsuffix")
+  (version "1.1.0")
+  (source (origin
+            (method url-fetch)
+            (uri (pypi-uri "publicsuffix" version))
+            (sha256
+             (base32
+              "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
+  (build-system python-build-system)
+  (arguments
+   `(#:tests? #f)) ; tests use the internet
+  (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
+  (synopsis "Get suffix for a domain name")
+  (description "Get a public suffix for a domain name using the Public Suffix
+List.")
+  (license license:expat)
+  (properties `((python2-variant . ,(delay python2-nltk))))))
+
+(define-public python2-publicsuffix
+  (let ((base (package-with-python2 (strip-python2-variant python-publicsuffix))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))