Patchwork [4/6] gnu: Add python-furl.

login
register
mail settings
Submitter Danny Milosavljevic
Date Nov. 3, 2016, 10:56 a.m.
Message ID <20161103105604.2937-5-dannym@scratchpost.org>
Download mbox | patch
Permalink /patch/17156/
State New
Headers show

Comments

Danny Milosavljevic - Nov. 3, 2016, 10:56 a.m.
* gnu/packages/python.scm (python-furl, python2-furl): New variables.
---
 gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
Hartmut Goebel - Nov. 3, 2016, 10:01 p.m.
Am 03.11.2016 um 11:56 schrieb Danny Milosavljevic:
> +    (description "This package provides simple URL manipulation in Python.")

Again, I'd prefer some text like on the homepage:

    Python's standard urllib and urlparse modules provide a number of
    URL manipulation functions, but using these functions to perform
    common URL manipulations proves tedious. Furl makes manipulating
    URLs easy.

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index aee97cb..b765a74 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3894,6 +3894,37 @@  simple and Pythonic domain language.")
        `(("python2-setuptools" ,python2-setuptools)
          ,@(package-native-inputs base))))))
 
+(define-public python-furl
+  (package
+    (name "python-furl")
+    (version "0.5.6")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "furl" version))
+        (sha256
+          (base32
+            "0lzpfpm686hvz3sr1mcrnd1b3lgmnw8v59gb43wfi98r3b671pqc"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)
+       ("python-orderedmultidict" ,python-orderedmultidict)))
+    (native-inputs
+     `(("python-pycodestyle" ,python-pycodestyle)))
+    (home-page "https://github.com/gruns/furl")
+    (synopsis "URL manipulation in Python")
+    (description "This package provides simple URL manipulation in Python.")
+    (license license:unlicense)
+    (properties `((python2-variant . ,(delay python2-furl))))))
+
+(define-public python2-furl
+  (let ((base (package-with-python2 (strip-python2-variant
+                                     python-furl))))
+    (package (inherit base)
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs base))))))
+
 (define-public python-sqlalchemy-utils
   (package
     (name "python-sqlalchemy-utils")