gnu: Add python-bottle.
[jackhill/guix/guix.git] / gnu / packages / python.scm
index e51405b..7cbeeb6 100644 (file)
@@ -27,7 +27,7 @@
 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
+;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
 ;;; Copyright © 2016 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
-;;; Copyright © 2017 humanitiesNerd <catonano@gmail.com>
+;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
+;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -63,6 +65,7 @@
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages django)
   #:use-module (gnu packages file)
@@ -1108,14 +1111,14 @@ Python file, so it can be easily copied into your project.")
 (define-public python-dateutil
   (package
     (name "python-dateutil")
-    (version "2.5.3")
+    (version "2.6.0")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "python-dateutil" version))
       (sha256
        (base32
-        "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l"))))
+        "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-six" ,python-six)))
@@ -1353,7 +1356,8 @@ Python 3.3+.")
     (build-system python-build-system)
     (arguments `(#:python ,python-2
                  #:tests? #f))                    ; invalid command "test"
-    (home-page "https://fedorahosted.org/dogtail/")
+    ;; Currently no offical homepage.
+    (home-page "https://pypi.python.org/pypi/dogtail/")
     (synopsis "GUI test tool and automation framework written in Python")
     (description
      "Dogtail is a GUI test tool and automation framework written in Python.
@@ -1484,16 +1488,38 @@ backported for previous versions of Python from 2.4 to 3.3.")
        (base32
         "0iv1c34npr4iynwpgv1vkjx9rjd18a85ir8c01gc5f7wp8iv7l1x"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-tests
+           (lambda _
+             (substitute* "tests/test_parse_type_parse.py"
+               ;; Newer Python versions don't have the problem this test tests.
+               (("self[.]assertRaises[(]parse.TooManyFields, p.parse, ''[)]")
+                ""))
+             #t)))))
     (propagated-inputs
      `(("python-six" ,python-six)
        ("python-parse" ,python-parse)))
-    (arguments '(#:tests? #f))            ;TODO: tests require pytest
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-runner" ,python-pytest-runner)))
     (home-page "https://github.com/jenisys/parse_type")
     (synopsis "Extended parse module")
     (description
      "Parse_type extends the python parse module.")
+    (properties
+     `((python2-variant . ,(delay python2-parse-type))))
     (license license:bsd-3)))
 
+(define-public python2-parse-type
+  (let ((base (package-with-python2
+                (strip-python2-variant python-parse-type))))
+    (package (inherit base)
+      (propagated-inputs
+       `(("python2-enum34" ,python2-enum34)
+         ,@(package-propagated-inputs base))))))
+
 (define-public python-parse
   (package
     (name "python-parse")
@@ -1548,14 +1574,14 @@ existing ones.")
 (define-public scons
   (package
     (name "scons")
-    (version "2.3.4")
+    (version "2.5.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/scons/scons/" version
                                  "/scons-" version ".tar.gz"))
              (sha256
               (base32
-               "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
+               "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
     (build-system python-build-system)
     (arguments
      ;; With Python 3.x, fails to build with a syntax error.
@@ -1843,14 +1869,14 @@ and many external plugins.")
 (define-public python-pytest-cov
   (package
     (name "python-pytest-cov")
-    (version "2.2.1")
+    (version "2.4.0")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "pytest-cov" version))
         (sha256
          (base32
-          "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
+          "03c2qc42r4bczyw93gd7n0qi1h1jfhw7fnbhi33c3vp1hs81gm2k"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -1879,14 +1905,14 @@ supports coverage of subprocesses.")
 (define-public python-pytest-runner
   (package
     (name "python-pytest-runner")
-    (version "2.6.2")
+    (version "2.11.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pytest-runner" version))
        (sha256
         (base32
-         "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
+         "1cw978kqqcq916b9gfns1qjqvg33c5ail5jhw9054dsynkm32flq"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -2641,7 +2667,7 @@ version numbers.")
     (build-system python-build-system)
     (propagated-inputs
      `(("python-chardet" ,python-chardet)))
-    (home-page "https://fedorahosted.org/kitchen")
+    (home-page "https://github.com/fedora-infra/kitchen")
     (synopsis "Python API for snippets")
     (description "@code{kitchen} module provides a python API for all sorts of
 little useful snippets of code that everybody ends up writing for their projects
@@ -3375,15 +3401,13 @@ mining and data analysis.")
 (define-public python-rq
   (package
     (name "python-rq")
-    (version "0.5.2")
+    (version "0.7.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/r/rq/rq-"
-             version ".tar.gz"))
+       (uri (pypi-uri "rq" version))
        (sha256
-        (base32 "0b0z5hn8wkfg300hx7816csgv3bcfamlr29fi3yzgqmpqxwj3fix"))))
+        (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-click" ,python-click)
@@ -4217,6 +4241,38 @@ routines such as routines for numerical integration and optimization.")
   (package-with-python2
    (strip-python2-variant python-scipy)))
 
+(define-public python-sockjs-tornado
+  (package
+    (name "python-sockjs-tornado")
+    (version "1.0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sockjs-tornado" version))
+       (sha256
+        (base32
+         "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; There are no tests, and running the test phase requires missing
+       ;; dependencies
+       #:tests? #f))
+    (propagated-inputs
+     `(("python-tornado" ,python-tornado)))
+    (home-page "http://github.com/mrjoes/sockjs-tornado/")
+    (synopsis
+     "SockJS python server implementation on top of Tornado framework")
+    (description
+     "SockJS-tornado provides the server side counterpart to a SockJS client
+library, through the Tornado framework.
+
+SockJS provides a low latency, full duplex, cross-domain communication channel
+between a web browser and web server.")
+    (license license:expat)))
+
+(define-public python2-sockjs-tornado
+  (package-with-python2 python-sockjs-tornado))
+
 (define-public python-socksipy-branch
   (package
     (name "python-socksipy-branch")
@@ -4694,15 +4750,14 @@ a front-end for C compilers or analysis tools.")
 (define-public python-xcffib
   (package
     (name "python-xcffib")
-    (version "0.1.9")
+    (version "0.5.1")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/x/"
-                          "xcffib/xcffib-" version ".tar.gz"))
+      (uri (pypi-uri "xcffib" version))
       (sha256
        (base32
-        "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
+        "09gbnmr5vn58mm8xi3fmd7fz6743cks6c46dphnxzwax6zsxmy60"))))
     (build-system python-build-system)
     (inputs
      `(("libxcb" ,libxcb)))
@@ -4710,10 +4765,16 @@ a front-end for C compilers or analysis tools.")
      `(("python-cffi" ,python-cffi) ; used at run time
        ("python-six" ,python-six)))
     (arguments
-     `(;; FIXME: Tests cannot load libxcb.so.1
+     `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
        #:tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-libxcb-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((libxcb (assoc-ref inputs "libxcb")))
+               (substitute* '("xcffib/__init__.py")
+                 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
+               #t)))
          (add-after 'install 'install-doc
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((doc (string-append (assoc-ref outputs "out") "/share"
@@ -4735,17 +4796,17 @@ support for Python 3 and PyPy.  It is based on cffi.")
 (define-public python-cairocffi
   (package
     (name "python-cairocffi")
-    (version "0.6")
+    (version "0.8.0")
     (source
      (origin
       (method url-fetch)
       ;; The archive on pypi is missing the 'utils' directory!
-      (uri (string-append "https://github.com/SimonSapin/cairocffi/archive/v"
+      (uri (string-append "https://github.com/Kozea/cairocffi/archive/v"
                           version ".tar.gz"))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32
-        "03w5p62sp3nqiccx864sbq0jvh7946277jqx3rcc3dch5xwfvv51"))))
+        "1rk2dvy3fxrga6bvvxc2fi5lbaynm5h4a0w0aaxyn3bc77rszjg9"))))
     (build-system python-build-system)
     (outputs '("out" "doc"))
     (inputs
@@ -4779,7 +4840,7 @@ support for Python 3 and PyPy.  It is based on cffi.")
                (system* "python" "setup.py" "build_sphinx")
                (copy-recursively "docs/_build/html" html)
                #t))))))
-    (home-page "https://github.com/SimonSapin/cairocffi")
+    (home-page "https://github.com/Kozea/cairocffi")
     (synopsis "Python bindings and object-oriented API for Cairo")
     (description
      "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
@@ -5509,7 +5570,18 @@ features useful for text console applications.")
     (license license:lgpl2.1+)))
 
 (define-public python2-urwid
-  (package-with-python2 python-urwid))
+  (let ((python2-urwid (package-with-python2 python-urwid)))
+    (package
+      (inherit python2-urwid)
+      (arguments
+       (append
+        '(#:phases
+          (modify-phases %standard-phases
+            ;; Disable the vterm tests because of non-deterministic failures
+            ;; with Python 2. See https://github.com/urwid/urwid/issues/230.
+            (add-after 'unpack 'delete-test_vterm.py
+              (delete-file "urwid/tests/test_vterm.py"))))
+        (package-arguments python-urwid))))))
 
 (define-public python-openid
   (package
@@ -5523,6 +5595,18 @@ features useful for text console applications.")
         (base32
          "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+        (replace 'check
+          (lambda _
+            (zero? (system* "./admin/runtests")))))))
+    (properties `((python2-variant . ,(delay python2-openid))))
+    (propagated-inputs
+     `(("python-defusedxml" ,python-defusedxml)))
+    (native-inputs
+     `(("python-psycopg2" ,python-psycopg2)
+       ("python-django" ,python-django)))
     (home-page "https://github.com/necaris/python3-openid")
     (synopsis "OpenID support for servers and consumers")
     (description "This library provides OpenID authentication for Python, both
@@ -6094,13 +6178,13 @@ It is written entirely in Python.")
 (define-public python-tornado
   (package
     (name "python-tornado")
-    (version "4.3")
+    (version "4.5.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "tornado" version))
        (sha256
-        (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
+        (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
     (build-system python-build-system)
     (arguments
      '(;; FIXME: Two tests error out with:
@@ -6787,7 +6871,7 @@ should be stored on various operating systems.")
 (define-public python-llfuse
   (package
     (name "python-llfuse")
-    (version "1.1.1")
+    (version "1.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -6795,7 +6879,7 @@ should be stored on various operating systems.")
                     "llfuse-" version ".tar.bz2"))
               (sha256
                (base32
-                "0v6vj9mb286njgd1szg9hz2qdh5f3vkhsvajripfcqg458av310v"))))
+                "11hms1x68bf1bqbqy7w3wpffqsd3jkgricmzrc1hrnwkswfzzlr4"))))
     (build-system python-build-system)
     (inputs
      `(("fuse" ,fuse)
@@ -7099,14 +7183,14 @@ designed to efficiently cope with extremely large amounts of data.")
 (define-public python-pyasn1
   (package
     (name "python-pyasn1")
-    (version "0.1.9")
+    (version "0.2.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pyasn1" version))
        (sha256
         (base32
-         "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"))))
+         "1b86yx23c1x74clai05a5ma8c8nfmhlx3j1mxq0ff657i2ylx33k"))))
     (build-system python-build-system)
     (home-page "http://pyasn1.sourceforge.net/")
     (synopsis "ASN.1 types and codecs")
@@ -7197,15 +7281,14 @@ versions of Python.")
 (define-public python-idna
   (package
     (name "python-idna")
-    (version "2.0")
+    (version "2.5")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/i/"
-                           "idna/idna-" version ".tar.gz"))
+       (uri (pypi-uri "idna" version))
        (sha256
         (base32
-         "0frxgmgi234lr9hylg62j69j4ik5zhg0wz05w5dhyacbjfnrl68n"))))
+         "1ara12a7k2zc69msa0arrvw00gn61a6i6by01xb3lkkc0h4cxd9w"))))
     (build-system python-build-system)
     (home-page "https://github.com/kjd/idna")
     (synopsis "Internationalized domain names in applications")
@@ -7250,14 +7333,14 @@ responses, rather than doing any computation.")
 (define-public python-cryptography-vectors
   (package
     (name "python-cryptography-vectors")
-    (version "1.7.1")
+    (version "1.8.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "cryptography_vectors" version))
        (sha256
         (base32
-         "1x2mz4wggja5ih45c6cw0kzyad4jr8avg327dawjr1gnpdq1psa7"))))
+         "0hzvq0bfy21bc35p8z7zdxpv3hbvi7adg4axc1b5yd3hk16a1nh0"))))
     (build-system python-build-system)
     (home-page "https://github.com/pyca/cryptography")
     (synopsis "Test vectors for the cryptography package")
@@ -7272,29 +7355,33 @@ responses, rather than doing any computation.")
 (define-public python-cryptography
   (package
     (name "python-cryptography")
-    (version "1.7.1")
+    (version "1.8.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "cryptography" version))
        (sha256
         (base32
-         "0k6v7wq4h0yk9r0x0bl2x9fyrg4a6gj5qp4m9mgpk6m481yyygwm"))))
+         "1nmy4fw3zy7rlvarkhn33g9905rwpy9z7k5kv8j80f0s6ynfp24f"))))
     (build-system python-build-system)
     (inputs
      `(("openssl" ,openssl)))
     (propagated-inputs
-     `(("python-cffi" ,python-cffi)
+     `(("python-asn1crypto" ,python-asn1crypto)
+       ("python-cffi" ,python-cffi)
        ("python-six" ,python-six)
-       ("python-pyasn1" ,python-pyasn1)
        ("python-idna" ,python-idna)
+       ;; Packaging is used to check the version of python-cffi in
+       ;; 'src/cryptography/hazmat/primitives/ciphers/base.py'. We should be
+       ;; able to remove this dependency in the next release of cryptography:
+       ;; python-cryptography:
+       ;; https://github.com/pyca/cryptography/commit/0417d00d9ff1e19bc3ab67d39bdd18e1674768c1
+       ("python-packaging" ,python-packaging)
        ("python-iso8601" ,python-iso8601)))
     (native-inputs
      `(("python-cryptography-vectors" ,python-cryptography-vectors)
        ("python-hypothesis" ,python-hypothesis)
        ("python-pretend" ,python-pretend)
-       ("python-pyasn1" ,python-pyasn1)
-       ("python-pyasn1-modules" ,python-pyasn1-modules)
        ("python-pytz" ,python-pytz)
        ("python-pytest" ,python-pytest-3.0)))
     (home-page "https://github.com/pyca/cryptography")
@@ -7435,7 +7522,7 @@ a hash value.")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "python-termcolor" version))
+       (uri (pypi-uri "termcolor" version))
        (sha256
         (base32
          "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
@@ -8839,13 +8926,13 @@ processes across test runs.")
 (define-public python-icalendar
   (package
     (name "python-icalendar")
-    (version "3.11.3")
+    (version "3.11.4")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "icalendar" version))
              (sha256
               (base32
-               "086jslw8cg2hni79j267p1dy6d27m7q5hi39ni2clh9waqbdf5v3"))))
+               "0ix3xxykz8hs8mx4f2063djawmd888y3vsl75fbvbfqvg67v35jn"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-dateutil" ,python-dateutil)
@@ -9373,6 +9460,7 @@ interface to the Amazon Web Services (AWS) API.")
       ("python-botocore" ,python-botocore)
       ("python-s3transfer" ,python-s3transfer)
       ("python-docutils" ,python-docutils)
+      ("python-pyyaml" ,python-pyyaml)
       ("python-rsa" ,python-rsa)))
    (arguments
     ;; FIXME: The 'pypi' release does not contain tests.
@@ -10021,13 +10109,13 @@ programmatically interfacing with your system's $EDITOR.")
 (define-public python-sphinxcontrib-programoutput
   (package
     (name "python-sphinxcontrib-programoutput")
-    (version "0.8")
+    (version "0.10")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "sphinxcontrib-programoutput" version))
               (sha256
                (base32
-                "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
+                "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
     (build-system python-build-system)
     (arguments
      ;; FIXME: Many tests are failing and the upstream is gone.
@@ -10661,14 +10749,14 @@ development version of CPython that are not available in older releases.")
 (define-public python-future
   (package
     (name "python-future")
-    (version "0.15.2")
+    (version "0.16.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "future" version))
        (sha256
         (base32
-         "15wvcfzssc68xqnqi1dq4fhd0848hwi9jn42hxyvlqna40zijfrx"))))
+         "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
     (build-system python-build-system)
     ;; Many tests connect to the network or are otherwise flawed.
     ;; https://github.com/PythonCharmers/python-future/issues/210
@@ -13392,6 +13480,33 @@ faster ones are not available.")
 to ansi-escaped strings suitable for display in a terminal.")
     (license license:expat)))
 
+(define-public python-ansi2html
+  (package
+    (name "python-ansi2html")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ansi2html" version))
+       (sha256
+        (base32
+         "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-nose" ,python-nose)))
+    (propagated-inputs
+     `(("python-six" ,python-six)))
+    (home-page "http://github.com/ralphbean/ansi2html")
+    (synopsis "Convert ANSI-decorated console output to HTML")
+    (description
+     "@command{ansi2html} is a Python library and command line utility for
+convering text with ANSI color codes to HTML or LaTeX.")
+    (license license:gpl3+)))
+
+(define-public python2-ansi2html
+  (package-with-python2 python-ansi2html))
+
 (define-public python-ddt
   (package
     (name "python-ddt")
@@ -13999,3 +14114,1108 @@ exception message with a traceback that points to the culprit.")
 
 (define-public python2-fudge
   (package-with-python2 python-fudge))
+
+(define-public python-oauth2client
+  (package
+    (name "python-oauth2client")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "oauth2client" version))
+       (sha256
+        (base32
+         "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f))
+    (propagated-inputs
+     `(("python-httplib2" ,python-httplib2)
+       ("python-pyasn1" ,python-pyasn1)
+       ("python-pyasn1-modules" ,python-pyasn1-modules)
+       ("python-rsa" ,python-rsa)
+       ("python-six" ,python-six)))
+    (home-page "http://github.com/google/oauth2client/")
+    (synopsis "OAuth 2.0 client library")
+    (description "@code{python-oauth2client} provides an OAuth 2.0 client
+library for Python")
+    (license license:asl2.0)))
+
+(define-public python-flask-oidc
+  (package
+    (name "python-flask-oidc")
+    (version "1.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "flask-oidc" version))
+       (sha256
+        (base32
+         "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-flask" ,python-flask)
+       ("python-itsdangerous" ,python-itsdangerous)
+       ("python-oauth2client" ,python-oauth2client)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-nose" ,python-nose)
+       ("python-mock" ,python-mock)))
+    (home-page "https://github.com/puiterwijk/flask-oidc")
+    (synopsis "OpenID Connect extension for Flask")
+    (description "@code{python-flask-oidc} provides an OpenID Connect extension
+for Flask.")
+    (license license:bsd-2)))
+
+(define-public python-mwclient
+  (package
+    (name "python-mwclient")
+    (version "0.8.4")
+    (source
+     (origin
+       (method url-fetch)
+       ;; The PyPI version wouldn't contain tests.
+       (uri (string-append "https://github.com/mwclient/mwclient/archive/"
+                           "v" version ".tar.gz"))
+       (sha256
+        (base32
+         "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-requests" ,python-requests)
+       ("python-requests-oauthlib"
+        ,python-requests-oauthlib)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-pep8" ,python-pytest-pep8)
+       ("python-pytest-cache" ,python-pytest-cache)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-responses" ,python-responses)))
+    (home-page "https://github.com/btongminh/mwclient")
+    (synopsis "MediaWiki API client")
+    (description "This package provides a MediaWiki API client.")
+    (license license:expat)))
+
+(define-public python2-mwclient
+  (package-with-python2 python-mwclient))
+
+(define-public python-pytest-warnings
+  (package
+    (name "python-pytest-warnings")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-warnings" version))
+       (sha256
+        (base32
+         "0gf2dpahpl5igb7jh1sr9acj3z3gp7zahqdqb69nk6wx01c8kc1g"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("pytest" ,python-pytest-3.0)))
+    (home-page "https://github.com/fschulze/pytest-warnings")
+    (synopsis "Pytest plugin to list Python warnings in pytest report")
+    (description
+     "Python-pytest-warnings is a pytest plugin to list Python warnings in
+pytest report.")
+    (license license:expat)))
+
+(define-public python2-pytest-warnings
+  (package-with-python2 python-pytest-warnings))
+
+(define-public python-pytest-catchlog
+  (package
+    (name "python-pytest-catchlog")
+    (version "1.2.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-catchlog" version ".zip"))
+       (sha256
+        (base32
+         "1w7wxh27sbqwm4jgwrjr9c2gy384aca5jzw9c0wzhl0pmk2mvqab"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (propagated-inputs
+     `(("pytest" ,python-pytest-3.0)))
+    (home-page "https://github.com/eisensheng/pytest-catchlog")
+    (synopsis "Pytest plugin to catch log messages")
+    (description
+     "Python-pytest-catchlog is a pytest plugin to catch log messages.  This is
+a fork of pytest-capturelog.")
+    (license license:expat)))
+
+(define-public python2-pytest-catchlog
+  (package-with-python2 python-pytest-catchlog))
+
+(define-public python-utils
+  (package
+    (name "python-utils")
+    (version "2.1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "python-utils" version))
+              (sha256
+               (base32
+                "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("pytest-runner" ,python-pytest-runner)
+       ("pytest" ,python-pytest)
+       ("six" ,python-six)))
+    (home-page "https://github.com/WoLpH/python-utils")
+    (synopsis "Convenient utilities not included with the standard Python install")
+    (description
+      "Python Utils is a collection of small Python functions and classes which
+make common patterns shorter and easier.")
+    (license license:bsd-2)))
+
+(define-public python2-utils
+  (package-with-python2 python-utils))
+
+(define-public python-webassets
+  (package
+    (name "python-webassets")
+    (version "0.12.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "webassets" version))
+       (sha256
+        (base32
+         "1nrqkpb7z46h2b77xafxihqv3322cwqv6293ngaky4j3ff4cing7"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-jinja2" ,python-jinja2)
+       ("python-mock" ,python-mock)
+       ("python-nose" ,python-nose)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/miracle2k/webassets")
+    (synopsis "Media asset management")
+    (description "Merges, minifies and compresses Javascript and CSS files,
+supporting a variety of different filters, including YUI, jsmin, jspacker or
+CSS tidy.  Also supports URL rewriting in CSS files.")
+    (license license:bsd-2)))
+
+(define-public python-sphinx-me
+  (package
+    (name "python-sphinx-me")
+    (version "0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sphinx-me" version))
+       (sha256
+        (base32
+         "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/stephenmcd/sphinx-me")
+    (synopsis "Create a Sphinx documentation shell")
+    (description
+      "Create a Sphinx documentation shell for your project and include the
+README file as the documentation index.  It handles extracting the required
+meta data such as the project name, author and version from your project for
+use in your Sphinx docs.")
+    (license license:bsd-2)))
+
+(define-public python2-sphinx-me
+  (package-with-python2 python-sphinx-me))
+
+(define-public python-cssmin
+  (package
+    (name "python-cssmin")
+    (version "0.2.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "cssmin" version))
+        (sha256
+         (base32
+          "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/zacharyvoase/cssmin")
+    (synopsis "Python port of the YUI CSS Compressor")
+    (description "Python port of the YUI CSS Compressor.")
+    (license (list license:expat license:bsd-3))))
+
+(define-public python2-cssmin
+  (package-with-python2 python-cssmin))
+
+(define-public python-diff-match-patch
+  (package
+    (name "python-diff-match-patch")
+    (version "20121119")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "diff-match-patch" version))
+        (sha256
+         (base32
+          "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
+    (build-system python-build-system)
+    (home-page "https://code.google.com/p/google-diff-match-patch")
+    (synopsis "Synchronize plain text")
+    (description "Diff Match and Patch libraries offer robust algorithms to
+perform the operations required for synchronizing plain text.")
+    (license license:asl2.0)))
+
+(define-public python2-diff-match-patch
+  (package-with-python2 python-diff-match-patch))
+
+(define-public python-dirsync
+  (package
+    (name "python-dirsync")
+    (version "2.2.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "dirsync" version ".zip"))
+        (sha256
+         (base32
+          "1hcdvmkwd5512zbxpin0k7bx5bkgzy3swjx7d0kj1y45af6r75v2"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (propagated-inputs
+     `(("six" ,python-six)))
+    (home-page "https://bitbucket.org/tkhyn/dirsync")
+    (synopsis "Advanced directory tree synchronisation tool")
+    (description "Advanced directory tree synchronisation tool.")
+    (license license:expat)))
+
+(define-public python2-dirsync
+  (package-with-python2 python-dirsync))
+
+(define-public python-nosexcover
+  (package
+    (name "python-nosexcover")
+    (version "1.0.11")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "nosexcover" version))
+              (sha256
+               (base32
+                "10xqr12qv62k2flxwqhh8cr00cjhn7sfjrm6p35gd1x5bmjkr319"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-nose" ,python-nose)))
+    (home-page "http://github.com/cmheisel/nose-xcover")
+    (synopsis "Extends nose.plugins.cover to add Cobertura-style XML reports")
+    (description "Nose-xcover is a companion to the built-in
+@code{nose.plugins.cover}.  This plugin will write out an XML coverage report
+to a file named coverage.xml.
+
+It will honor all the options you pass to the Nose coverage plugin,
+especially -cover-package.")
+    (license license:expat)))
+
+(define-public python2-nosexcover
+  (package-with-python2 python-nosexcover))
+
+(define-public python-elasticsearch
+  (package
+    (name "python-elasticsearch")
+    (version "1.0.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "elasticsearch" version))
+        (sha256
+         (base32
+          "1sdw1r05cw7ihnmng8ra9v968fj7bq6sji8i1dikymsnkcpgc69g"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-nosexcover" ,python-nosexcover)
+       ("python-pyaml" ,python-pyaml)
+       ("python-requests" ,python-requests)))
+    (propagated-inputs
+     `(("urllib3" ,python-urllib3)))
+    (arguments
+     ;; tests require the test_elasticsearch module but it is not distributed.
+     `(#:tests? #f))
+    (home-page "https://github.com/elastic/elasticsearch-py")
+    (synopsis "Low-level client for Elasticsearch")
+    (description "Official low-level client for Elasticsearch.  Its goal is to
+provide common ground for all Elasticsearch-related code in Python; because of
+this it tries to be opinion-free and very extendable.")
+    (license license:expat)))
+
+(define-public python2-elasticsearch
+  (package-with-python2 python-elasticsearch))
+
+(define-public python-levenshtein
+  (package
+    (name "python-levenshtein")
+    (version "0.12.0")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (pypi-uri "python-Levenshtein" version))
+      (sha256
+       (base32
+        "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/ztane/python-Levenshtein")
+    (synopsis "Fast computation of Levenshtein distance and string similarity")
+    (description
+     "The Levenshtein Python C extension module contains functions for fast computation of
+@enumerate
+@item Levenshtein (edit) distance, and edit operations
+@item string similarity
+@item approximate median strings, and generally string averaging
+@item string sequence and set similarity
+@end enumerate
+It supports both normal and Unicode strings.")
+    (license license:gpl2+)))
+
+(define-public python2-levenshtein
+  (package-with-python2 python-levenshtein))
+
+(define-public python-scandir
+  (package
+    (name "python-scandir")
+    (version "1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "scandir" version))
+       (sha256
+        (base32 "0yjrgp0mxp3d8bjkq2m1ac2ys8n76wykksvgyjrnil9gr3fx7a5d"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/benhoyt/scandir")
+    (synopsis "Directory iteration function")
+    (description
+     "Directory iteration function like os.listdir(), except that instead of
+returning a list of bare filenames, it yields DirEntry objects that include
+file type and stat information along with the name.  Using scandir() increases
+the speed of os.walk() by 2-20 times (depending on the platform and file
+system) by avoiding unnecessary calls to os.stat() in most cases.")
+    (license license:bsd-3)))
+
+(define-public python2-scandir
+  (package-with-python2 python-scandir))
+
+(define-public python2-stemming
+  (package
+    (name "python2-stemming")
+    (version "1.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "stemming" version))
+       (sha256
+        (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2))
+    (home-page "https://bitbucket.org/mchaput/stemming/overview")
+    (synopsis "Python implementations of various stemming algorithms")
+    (description
+     "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
+stemming algorithms for English.  These implementations are straightforward and
+efficient, unlike some Python versions of the same algorithms available on the
+Web.  This package is an extraction of the stemming code included in the Whoosh
+search engine.")
+    (license license:public-domain)))
+
+(define-public python-factory-boy
+  (package
+    (name "python-factory-boy")
+    (version "2.8.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "factory_boy" version))
+       (sha256
+        (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
+    (build-system python-build-system)
+    (arguments
+     ;; Tests are not included in the tarball.
+     `(#:tests? #f))
+    (propagated-inputs
+     `(("faker" ,python-faker)))
+    (home-page "https://github.com/benhoyt/scandir")
+    (synopsis "Versatile test fixtures replacement")
+    (description
+     "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
+
+As a fixtures replacement tool, it aims to replace static, hard to maintain
+fixtures with easy-to-use factories for complex object.
+
+Instead of building an exhaustive test setup with every possible combination
+of corner cases, factory_boy allows you to use objects customized for the
+current test, while only declaring the test-specific fields")
+    (license license:expat)))
+
+(define-public python2-factory-boy
+  (package-with-python2 python-factory-boy))
+
+(define-public python-translate-toolkit
+  (package
+    (name "python-translate-toolkit")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
+       (sha256
+        (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-sphinx" ,python-sphinx)))
+    (propagated-inputs
+     `(("python-babel" ,python-babel)
+       ("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-chardet" ,python-chardet)
+       ("python-diff-match-patch" ,python-diff-match-patch)
+       ("python-levenshtein" ,python-levenshtein)
+       ("python-lxml" ,python-lxml)
+       ("python-six" ,python-six)
+       ("python-vobject" ,python-vobject)
+       ("python-pyyaml" ,python-pyyaml)))
+    (arguments
+     ;; TODO: tests are not run, because they end with
+     ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
+     ;; 'parse_funcs'
+     ;; during test setup.
+     `(#:tests? #f))
+    (home-page "http://toolkit.translatehouse.org")
+    (synopsis "Tools and API for translation and localization engineering")
+    (description
+     "Tools and API for translation and localization engineering.  It contains
+several utilities, as well as an API for building localization tools.")
+    (license license:gpl2+)))
+
+(define-public python2-translate-toolkit
+  (package-with-python2 python-translate-toolkit))
+
+(define-public python-mysqlclient
+  (package
+    (name "python-mysqlclient")
+    (version "1.3.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mysqlclient" version))
+       (sha256
+        (base32
+         "0qkj570x4rbsblji6frvsvp2v1ap32dqzj1lq62zp9515ffsyaj5"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("mariadb" ,mariadb)
+       ("nose" ,python-nose)
+       ("mock" ,python-mock)
+       ("py.test" ,python-pytest)))
+    (inputs
+     `(("mysql" ,mysql)
+       ("libz" ,zlib)
+       ("openssl" ,openssl)))
+    (home-page "https://github.com/PyMySQL/mysqlclient-python")
+    (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
+    (description "MySQLdb is an interface to the popular MySQL database server
+for Python.  The design goals are:
+@enumerate
+@item Compliance with Python database API version 2.0 [PEP-0249],
+@item Thread-safety,
+@item Thread-friendliness (threads will not block each other).
+@end enumerate")
+    (license license:gpl2)))
+
+(define-public python2-mysqlclient
+  (package-with-python2 python-mysqlclient))
+
+(define-public python-hiredis
+  (package
+    (name "python-hiredis")
+    (version "0.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "hiredis" version))
+       (sha256
+        (base32
+         "1dfm2k9l9zar9nw9fwmm74zrgraxdxs04vx9li56fjcf289qx5fa"))))
+    (build-system python-build-system)
+    (arguments
+     ;; no tests
+     `(#:tests? #f))
+    (home-page "https://github.com/redis/hiredis-py")
+    (synopsis "Python extension that wraps protocol parsing code in hiredis")
+    (description "Python-hiredis is a python extension that wraps protocol
+parsing code in hiredis.  It primarily speeds up parsing of multi bulk replies.")
+    (license license:bsd-3)))
+
+(define-public python2-hiredis
+  (package-with-python2 python-hiredis))
+
+(define-public python-fakeredis
+  (package
+    (name "python-fakeredis")
+    (version "0.8.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "fakeredis" version))
+       (sha256
+        (base32
+         "0zncahj3byyasyfx9i7k991ph0n0lq8v3a21pqri5qxn9564bk9r"))))
+    (build-system python-build-system)
+    (arguments
+     ;; no tests
+     `(#:tests? #f))
+    (home-page "https://github.com/jamesls/fakeredis")
+    (synopsis "Fake implementation of redis API for testing purposes")
+    (description "Fakeredis is a pure python implementation of the redis-py
+python client that simulates talking to a redis server.  This was created for a
+single purpose: to write unittests.  Setting up redis is not hard, but many time
+ you want to write unittests that do not talk to an external server (such as
+redis).  This module now allows tests to simply use this module as a reasonable
+substitute for redis.")
+    (license license:bsd-3)))
+
+(define-public python2-fakeredis
+  (package-with-python2 python-fakeredis))
+
+(define-public python-behave-web-api
+  (package
+    (name "python-behave-web-api")
+    (version "1.0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "behave-web-api" version))
+       (sha256
+        (base32
+         "03kpq2xsy1gab3jy0dccbxlsg7vwfy4lagss0qldwmx3xz6b3i19"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-dependencies
+           (lambda _
+             (substitute* "setup.py"
+               (("'wheel'") "")                ; We don't use it.
+               (("'ordereddict==1.1'") ""))))))) ; Python >= 2.7 has it built-in.
+    (propagated-inputs
+     `(("behave" ,behave)
+       ("python-requests" ,python-requests)))
+    (home-page "https://github.com/jefersondaniel/behave-web-api")
+    (synopsis "Provides testing for JSON APIs with Behave for Python")
+    (description "This package provides testing utility modules for testing
+JSON APIs with Behave.")
+    (license license:expat)))
+
+(define-public python2-behave-web-api
+  (package-with-python2 python-behave-web-api))
+
+(define-public python-flask-script
+  (package
+  (name "python-flask-script")
+  (version "2.0.5")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "Flask-Script" version))
+      (sha256
+        (base32
+          "0zqh2yq8zk7m9b4xw1ryqmrljkdigfb3hk5155a3b5hkfnn6xxyf"))))
+  (build-system python-build-system)
+  (propagated-inputs
+   `(("python-flask" ,python-flask)
+     ("python-argcomplete" ,python-argcomplete)
+     ("python-werkzeug" ,python-werkzeug)))
+  (native-inputs
+   `(("python-pytest" ,python-pytest)))
+  (home-page
+    "http://github.com/smurfix/flask-script")
+  (synopsis "Scripting support for Flask")
+  (description "The Flask-Script extension provides support for writing
+external scripts in Flask.  This includes running a development server,
+a customised Python shell, scripts to set up your database, cronjobs,
+and other command-line tasks that belong outside the web application
+itself.")
+  (license license:bsd-3)))
+
+(define-public python2-flask-script
+  (package-with-python2 python-flask-script))
+
+(define-public python-flask-migrate
+  (package
+  (name "python-flask-migrate")
+  (version "2.0.3")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "Flask-Migrate" version))
+      (sha256
+        (base32
+          "107x78lkqsnbg92dld3dkagg07jvchp3ib3y0sivc4ipz6n1y7rk"))))
+  (build-system python-build-system)
+  (propagated-inputs
+   `(("python-flask" ,python-flask)
+     ("python-alembic" ,python-alembic)
+     ("python-sqlalchemy" ,python-sqlalchemy)
+     ("python-flask-script" ,python-flask-script)
+     ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
+  (home-page "http://github.com/miguelgrinberg/flask-migrate/")
+  (synopsis "SQLAlchemy database migrations for Flask programs using
+Alembic")
+  (description "This package contains SQLAlchemy database migration tools
+for Flask programs that are using @code{python-alembic}.")
+  (license license:expat)))
+
+(define-public python2-flask-migrate
+  (package-with-python2 python-flask-migrate))
+
+(define-public python-packaging
+  (package
+    (name "python-packaging")
+    (version "16.8")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "packaging" version))
+        (sha256
+         (base32
+          "17k1xbjshackwvbsnxqixbph8rbqhz4bf4g3al5xyzhavxgq6l2x"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pretend" ,python-pretend)
+       ("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-pyparsing" ,python-pyparsing)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/pypa/packaging")
+    (synopsis "Core utilities for Python packages")
+    (description "Packaging is a Python module for dealing with Python packages.
+It offers an interface for working with package versions, names, and dependency
+information.")
+    ;; From 'LICENSE': This software is made available under the terms of
+    ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
+    ;; Contributions to this software is made under the terms of *both* these
+    ;; licenses.
+    (license (list license:asl2.0 license:bsd-2))))
+
+(define-public python2-packaging
+  (package-with-python2 python-packaging))
+
+(define-public python-sql
+  (package
+    (name "python-sql")
+    (version "0.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-sql" version))
+       (sha256
+        (base32
+         "0p6kaqj02vz0habmdx37zjk6hjxdfm8aw737zs059vvpr70ird87"))))
+    (build-system python-build-system)
+    (home-page "https://python-sql.tryton.org/")
+    (synopsis "Library to write SQL queries in a pythonic way")
+    (description "@code{python-sql} is a library to write SQL queries, that
+transforms idiomatic python function calls to well-formed SQL queries.")
+    (license license:bsd-3)))
+
+(define-public python2-sql
+  (package-with-python2 python-sql))
+
+(define-public python-genshi
+  (package
+    (name "python-genshi")
+    (version "0.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://ftp.edgewall.org/pub/genshi/Genshi-"
+             version ".tar.gz"))
+       (patches
+        (search-patches
+         ;; The first 4 patches are in the master branch upstream.
+         ;; See this as a reference https://genshi.edgewall.org/ticket/582
+         ;; The last 2 are NOT in any branch.
+         ;; They were sent as attachments to a ticket opened at
+         ;; https://genshi.edgewall.org/ticket/602#no1
+         "python-genshi-stripping-of-unsafe-script-tags.patch"
+         "python-genshi-disable-speedups-on-python-3.3.patch"
+         "python-genshi-isstring-helper.patch"
+         "python-genshi-add-support-for-python-3.4-AST.patch"
+         "python-genshi-fix-tests-on-python-3.5.patch"
+         "python-genshi-buildable-on-python-2.7.patch"))
+       (sha256
+        (base32
+         "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
+    (build-system python-build-system)
+    (home-page "https://genshi.edgewall.org/")
+    (synopsis "Toolkit for generation of output for the web")
+    (description "Genshi is a Python library that provides an integrated set
+of components for parsing, generating, and processing HTML, XML or other
+textual content for output generation on the web.")
+    (license license:bsd-3)))
+
+;; The linter here claims that patch file names should start with the package
+;; name. But, in this case the patches are inherited from python-genshi with
+;; the "python-genshi-" prefix instead of "python2-genshi-".
+(define-public python2-genshi
+  (package-with-python2 python-genshi))
+
+(define-public python-relatorio
+  (package
+    (name "python-relatorio")
+    (version "0.6.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "relatorio" version))
+       (sha256
+        (base32
+         "0lincq79mzgazwd9gh41dybjh9c3n87r83pl8nk3j79aihyfk84z"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-lxml" ,python-lxml)
+       ("python-genshi" ,python-genshi)))
+    (home-page "https://relatorio.tryton.org/")
+    (synopsis "Templating library able to output ODT and PDF files")
+    (description "Relatorio is a templating library which provides a way to
+easily output ODT, ODS, PNG, SVG and several other kinds of files.  Support
+for more filetypes can be easily added by creating plugins for them.")
+    (license license:gpl3+)))
+
+(define-public python2-relatorio
+  (package-with-python2 python-relatorio))
+
+(define-public python-radon
+  (package
+    (name "python-radon")
+    (version "1.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "radon" version))
+       (sha256
+        (base32
+         "1h6jv36am0i827182a04ki6291lyx4kp957xfr5njgprj4nd0qsl"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-colorama" ,python-colorama)
+       ("python-flake8-polyfill" ,python-flake8-polyfill)
+       ("python-mando" ,python-mando-0.3.1)))
+    (native-inputs
+     `(("python-flake8" ,python-flake8)
+       ("python-tox" ,python-tox)
+       ("python-pytest" ,python-pytest)
+       ("python-paramunittest" ,python-paramunittest)))
+    (home-page "https://radon.readthedocs.org/")
+    (synopsis "Code Metrics in Python")
+    (description "Radon is a Python tool which computes various code metrics.
+Supported metrics are:
+@itemize @bullet
+@item raw metrics: SLOC, comment lines, blank lines, &c.
+@item Cyclomatic Complexity (i.e.  McCabe’s Complexity)
+@item Halstead metrics (all of them)
+@item the Maintainability Index (a Visual Studio metric)
+@end itemize")
+    (license license:expat)))
+
+(define-public python2-radon
+  (package-with-python2 python-radon))
+
+(define-public python-sure
+  (package
+    (name "python-sure")
+    (version "1.4.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sure" version))
+       (sha256
+        (base32
+         "1iyqsy2d6radi88g1qf0lziy5b39h5cpb3g5jiqyb4xi46ig3x1z"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-mock" ,python-mock)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (home-page "https://github.com/gabrielfalcao/sure")
+    (synopsis "Automated testing library in python for python")
+    (description
+     "Sure is a python library that leverages a DSL for writing assertions.
+Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
+    (license license:gpl3+)))
+
+(define-public python2-sure
+  (package-with-python2 python-sure))
+
+(define-public python2-couleur
+  ;; This package does not seem to support python3 at all, hence,
+  ;; only the python2 variant definition is provided.
+  (package
+    (name "python2-couleur")
+    (version "0.6.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "couleur" version))
+       (sha256
+        (base32
+         "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2))
+    (home-page "https://github.com/gabrielfalcao/couleur")
+    (synopsis
+     "ANSI terminal tool for python, colored shell and other handy fancy features")
+    (description
+     "@code{Couleur} provides python programs a way to use the ANSI features in a unix
+terminal such as coloured output in the shell, overwriting output, indentation, etc.")
+    ;; README.md says ASL2.0, but all source code headers are LGPL3+.
+    ;; https://github.com/gabrielfalcao/couleur/issues/11
+    (license license:lgpl3+)))
+
+(define-public python-misaka
+  (package
+    (name "python-misaka")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "misaka" version))
+       (sha256
+        (base32
+         "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; Line 37 of setup.py calls self.run_command('develop')
+       ;; in the 'check' phase. This command seems to be trying
+       ;; to write to
+       ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
+       ;; for which it does not have the permission to write.
+       #:tests? #f))
+    (propagated-inputs
+     `(("python-cffi" ,python-cffi)))
+    (home-page "https://github.com/FSX/misaka")
+    (synopsis "Python binding for Hoedown")
+    (description
+     "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
+library written in C.  It features a fast HTML renderer and functionality to make custom
+renderers (e.g. man pages or LaTeX).")
+    (license license:expat)))
+
+(define-public python2-misaka
+  (package-with-python2 python-misaka))
+
+(define-public python2-steadymark
+  ;; This is forced into being a python2 only variant
+  ;; due to its dependence on couleur that has no support
+  ;; for python3
+  (package
+    (name "python2-steadymark")
+    (version "0.7.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "steadymark" version))
+       (sha256
+        (base32
+         "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-couleur" ,python2-couleur)
+       ("python-sure" ,python2-sure)
+       ("python-misaka" ,python2-misaka)))
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'patch-setup-py
+           (lambda _
+             ;; Update requirements from dependency==version
+             ;; to dependency>=version
+             (substitute* "setup.py"
+               (("==") ">="))
+             #t)))))
+    (home-page "https://github.com/gabrielfalcao/steadymark")
+    (synopsis "Markdown-based test runner for python")
+    (description
+     "@code{Steadymark} allows documentation to be written in github-flavoured
+markdown.  The documentation may contain snippets of code surrounded by python
+code blocks and @code{Steadymark} will find these snippets and run them, making
+sure that there are no old malfunctional examples in the documentation examples.")
+    (license license:expat)))
+
+(define-public python-nose-randomly
+  (package
+    (name "python-nose-randomly")
+    (version "1.2.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "nose-randomly" version))
+       (sha256
+        (base32
+         "1cw9dlr1zh3w4i438kin7z0rm8092ki52hayisyc43h9pcplq7rn"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-nose" ,python-nose)
+       ("python-numpy" ,python-numpy)))
+    (home-page "https://github.com/adamchainz/nose-randomly")
+    (synopsis
+     "Nose plugin to randomly order tests and control random.seed")
+    (description
+     "This is a @code{Nose} plugin to randomly order tests which can be quite
+powerful in discovering hidden flaws in the tests themselves, while helping to
+reduce inter-test dependencies.  It also helps in controlling @code{random.seed},
+by resetting it to a repeatable number for each test, enabling the tests to
+create data based on random numbers and yet remain repeatable.")
+    (license license:bsd-3)))
+
+(define-public python2-nose-randomly
+  (package-with-python2 python-nose-randomly))
+
+(define-public python-jsonpointer
+  (package
+    (name "python-jsonpointer")
+    (version "1.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jsonpointer" version))
+       (sha256
+        (base32
+         "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
+  (build-system python-build-system)
+  (home-page "https://github.com/stefankoegl/python-json-pointer")
+  (synopsis "Identify specific nodes in a JSON document")
+  (description "@code{jsonpointer} allows you to access specific nodes
+by path in a JSON document (see RFC 6901).")
+  (license license:bsd-3)))
+
+(define-public python2-jsonpointer
+  (package-with-python2 python-jsonpointer))
+
+(define-public python-rfc3987
+  (package
+    (name "python-rfc3987")
+    (version "1.3.7")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (pypi-uri "rfc3987" version))
+      (sha256
+       (base32
+        "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
+    (build-system python-build-system)
+    (home-page "http://pypi.python.org/pypi/rfc3987")
+    (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
+    (description "@code{rfc3987} provides routines for parsing and
+validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
+    (license license:gpl3+)))
+
+(define-public python2-rfc3987
+  (package-with-python2 python-rfc3987))
+
+(define-public python-validate-email
+  (package
+    (name "python-validate-email")
+    (version "1.3")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (pypi-uri "validate_email" version))
+      (sha256
+       (base32
+        "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
+    (build-system python-build-system)
+    (home-page "http://github.com/syrusakbary/validate_email")
+    (synopsis "Verifies if an email address is valid and really exists")
+    (description "@code{validate_email} can be used to verify if an email
+address is valid and really exists.")
+    (license license:lgpl3+)))
+
+(define-public python2-validate-email
+  (package-with-python2 python-validate-email))
+
+(define-public python-flex
+  (package
+    (name "python-flex")
+    (version "6.10.0")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (pypi-uri "flex" version))
+      (sha256
+       (base32
+        "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-click" ,python-click)
+       ("python-iso8601" ,python-iso8601)
+       ("python-jsonpointer" ,python-jsonpointer)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-requests" ,python-requests)
+       ("python-rfc3987" ,python-rfc3987)
+       ("python-six" ,python-six)
+       ("python-validate-email" ,python-validate-email)))
+    (home-page "https://github.com/pipermerriam/flex")
+    (synopsis "Validates Swagger schemata")
+    (description "@code{flex} can be used to validate Swagger schemata.")
+    (license license:bsd-3)))
+
+(define-public python2-flex
+  (package-with-python2 python-flex))
+
+(define-public python-marshmallow
+  (package
+    (name "python-marshmallow")
+    (version "3.0.0b2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (pypi-uri "marshmallow" version))
+      (sha256
+       (base32
+        "11bnpvfdbczr74177p295zbkdrax2cahvbj5bqhhlprgz2xxi5d9"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-dateutil" ,python-dateutil)
+       ("python-simplejson" ,python-simplejson)))
+    (native-inputs
+     `(("python-pytest-3.0" ,python-pytest-3.0)
+       ("python-pytz" ,python-pytz)))
+    (home-page "https://github.com/marshmallow-code/marshmallow")
+    (synopsis "Convert complex datatypes to and from native
+Python datatypes.")
+    (description "@code{marshmallow} provides a library for converting
+complex datatypes to and from native Python datatypes.")
+    (license license:expat)))
+
+(define-public python2-marshmallow
+  (package-with-python2 python-marshmallow))
+
+(define-public python-bottle
+  (package
+    (name "python-bottle")
+    (version "0.12.13")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (pypi-uri "bottle" version))
+      (sha256
+        (base32
+          "0m9k2a7yxvggc4kw8fsvj381vgsvfcdshg5nzy6vwrxiw2p53drr"))))
+    (build-system python-build-system)
+    (home-page "http://bottlepy.org/")
+    (synopsis "WSGI framework for small web-applications.")
+    (description "@code{python-bottle} is a WSGI framework for small web-applications.")
+    (license license:expat)))
+
+(define-public python2-bottle
+  (package-with-python2 python-bottle))