gnu: python-mistune: Update to 0.8.3 [fixes CVE-2017-{15612,16876}].
[jackhill/guix/guix.git] / gnu / packages / python.scm
index 0fa78ff..832afe8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
@@ -469,60 +470,6 @@ pidof, tty, taskset, pmap.")
 (define-public python2-psutil
   (package-with-python2 python-psutil))
 
-(define-public python-ccm
-  (package
-    (name "python-ccm")
-    (version "2.1.6")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "ccm" version))
-       (sha256
-        (base32
-         "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     `(("python-pyyaml" ,python-pyyaml)
-       ;; Not listed in setup.py, but used in ccmlib/node.py for full
-       ;; functionality
-       ("python-psutil" ,python-psutil)
-       ("python-six" ,python-six)))
-    (home-page "https://github.com/pcmanus/ccm")
-    (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
-localhost")
-    (description "Cassandra Cluster Manager is a development tool for testing
-local Cassandra clusters. It creates, launches and removes Cassandra clusters
-on localhost.")
-    (license license:asl2.0)))
-
-(define-public python2-ccm
-  (package-with-python2 python-ccm))
-
-(define-public python-pytz
-  (package
-    (name "python-pytz")
-    (version "2017.2")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "pytz" version ".zip"))
-      (sha256
-       (base32
-        "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m"))))
-    (build-system python-build-system)
-    (native-inputs
-     `(("unzip" ,unzip)))
-    (home-page "http://pythonhosted.org/pytz")
-    (synopsis "Python timezone library")
-    (description "This library brings the Olson tz database into Python.  It
-allows accurate and cross platform timezone calculations using Python 2.4 or
-higher.  It also solves the issue of ambiguous times at the end of daylight
-saving time.  Almost all of the Olson timezones are supported.")
-    (license license:expat)))
-
-(define-public python2-pytz
-  (package-with-python2 python-pytz))
-
 (define-public python-clyent
   (package
     (name "python-clyent")
@@ -1020,7 +967,7 @@ from the Python interpreter, or as a small part of a larger application.")
     (native-inputs
      `(("python-py" ,python-py)
        ("python-pytest" ,python-pytest)))
-    (home-page "http://pypi.python.org/pypi/six/")
+    (home-page "https://pypi.python.org/pypi/six/")
     (synopsis "Python 2 and 3 compatibility utilities")
     (description
      "Six is a Python 2 and 3 compatibility library.  It provides utility
@@ -1033,59 +980,6 @@ Python file, so it can be easily copied into your project.")
 (define-public python2-six
   (package-with-python2 python-six))
 
-(define-public python-dateutil
-  (package
-    (name "python-dateutil")
-    (version "2.6.0")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "python-dateutil" version))
-      (sha256
-       (base32
-        "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     `(("python-six" ,python-six)))
-    (home-page "https://dateutil.readthedocs.io/en/stable/")
-    (synopsis "Extensions to the standard datetime module")
-    (description
-     "The dateutil module provides powerful extensions to the standard
-datetime module, available in Python 2.3+.")
-    (license license:bsd-3)))
-
-(define-public python2-dateutil
-  (package-with-python2 python-dateutil))
-
-(define-public python-parsedatetime
-  (package
-    (name "python-parsedatetime")
-    (version "2.4")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "parsedatetime" version))
-      (sha256
-       (base32
-        "0jxqkjks7z9dn222cqgvskp4wr6d92aglinxq7pd2w4mzdc7r09x"))))
-    (build-system python-build-system)
-    (native-inputs
-     `(("python-nose" ,python-nose)
-       ("python-pyicu" ,python-pyicu)
-       ("python-pytest" ,python-pytest)
-       ("python-pytest-runner" ,python-pytest-runner)))
-    (propagated-inputs
-     `(("python-future" ,python-future)))
-    (home-page "https://github.com/bear/parsedatetime/")
-    (synopsis
-     "Parse human-readable date/time text")
-    (description
-     "Parse human-readable date/time text.")
-    (license license:asl2.0)))
-
-(define-public python2-parsedatetime
-  (package-with-python2 python-parsedatetime))
-
 (define-public python-schedule
   (package
     (name "python-schedule")
@@ -1146,55 +1040,6 @@ doing practical, real world data analysis in Python.")
 (define-public python2-pandas
   (package-with-python2 python-pandas))
 
-(define-public python-tzlocal
-  (package
-    (name "python-tzlocal")
-    (version "1.2.2")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "tzlocal" version))
-      (sha256
-       (base32
-        "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     `(("python-pytz" ,python-pytz)))
-    (home-page "https://github.com/regebro/tzlocal")
-    (synopsis
-     "Local timezone information for Python")
-    (description
-     "Tzlocal returns a tzinfo object with the local timezone information.
-This module attempts to fix a glaring hole in pytz, that there is no way to
-get the local timezone information, unless you know the zoneinfo name, and
-under several distributions that's hard or impossible to figure out.")
-    (license license:cc0)))
-
-(define-public python2-pysqlite
-  (package
-    (name "python2-pysqlite")
-    (version "2.8.3")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (pypi-uri "pysqlite" version))
-      (sha256
-       (base32
-        "1424gwq9sil2ffmnizk60q36vydkv8rxs6m7xs987kz8cdc37lqp"))))
-    (build-system python-build-system)
-    (inputs
-     `(("sqlite" ,sqlite)))
-    (arguments
-     `(#:python ,python-2 ; incompatible with Python 3
-       #:tests? #f)) ; no test target
-    (home-page "https://github.com/ghaering/pysqlite")
-    (synopsis "SQLite bindings for Python")
-    (description
-     "Pysqlite provides SQLite bindings for Python that comply to the
-Database API 2.0T.")
-    (license license:zlib)))
-
-
 (define-public python2-mechanize
   (package
     (name "python2-mechanize")
@@ -1264,34 +1109,42 @@ Python 3.3+.")
 (define-public python-pyicu
   (package
     (name "python-pyicu")
-    (version "1.9.5")
+    (version "1.9.8")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "PyICU" version))
       (sha256
        (base32
-        "16rmxy9y0qhqqna2v49i7nzwm09as699rbyvh4raw7w602w55c3k"))))
+        "05nz4p2dpkhwj6y9kik24xbvmfxji39nl0xw0sc0nvp9fgzf6xnd"))))
     (build-system python-build-system)
-    (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-before 'check 'delete-failing-test
-           (lambda _
-             ;; XXX: These tests require locales that are unavailable
-             ;; in the build environment.
-             (delete-file "test/test_DateTimeParserGenerator.py")
-             #t)))))
     (inputs
      `(("icu4c" ,icu4c)))
-    (home-page "http://pyicu.osafoundation.org/")
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/ovalhub/pyicu")
     (synopsis "Python extension wrapping the ICU C++ API")
     (description
      "PyICU is a python extension wrapping the ICU C++ API.")
+    (properties `((python2-variant . ,(delay python2-pyicu))))
     (license license:x11)))
 
 (define-public python2-pyicu
-  (package-with-python2 python-pyicu))
+  (let ((base (package-with-python2
+                (strip-python2-variant python-pyicu))))
+    (package
+      (inherit base)
+      (arguments
+       `(,@(package-arguments base)
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'check 'delete-failing-test
+             (λ _
+               ;; XXX: This fails due to Unicode issues unique to Python 2,
+               ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
+               (delete-file "test/test_Script.py")
+               #t))))))))
 
 (define-public python2-dogtail
   ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
@@ -1526,19 +1379,17 @@ existing ones.")
 (define-public scons
   (package
     (name "scons")
-    (version "2.5.1")
+    (version "3.0.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/scons/scons/" version
                                  "/scons-" version ".tar.gz"))
              (sha256
               (base32
-               "1wji1z9jdkhnmm99apx6fhld9cs52rr56aigniyrcsmlwy52298b"))))
+               "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
     (build-system python-build-system)
     (arguments
-     ;; With Python 3.x, fails to build with a syntax error.
-     `(#:python ,python-2
-       #:use-setuptools? #f                ; still relies on distutils
+     `(#:use-setuptools? #f                ; still relies on distutils
        #:tests? #f))                       ; no 'python setup.py test' command
     (home-page "http://scons.org/")
     (synopsis "Software construction tool written in Python")
@@ -1550,6 +1401,11 @@ In short, SCons is an easier, more reliable and faster way to build
 software.")
     (license license:x11)))
 
+(define-public scons-python2
+  (package
+    (inherit (package-with-python2 scons))
+    (name "scons-python2")))
+
 (define-public python-extras
   (package
     (name "python-extras")
@@ -2675,56 +2531,6 @@ and is very extensible.")
 (define-public python2-scikit-image
   (package-with-python2 python-scikit-image))
 
-(define-public python-redis
-  (package
-    (name "python-redis")
-    (version "2.10.5")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "redis" version))
-       (sha256
-        (base32 "0csmrkxb29x7xs9b51zplwkkq2hwnbh9jns1g85dykn5rxmaxysx"))))
-    (build-system python-build-system)
-    ;; Tests require a running Redis server
-    (arguments '(#:tests? #f))
-    ;; As long as we are not running test, we do not need this input :-)
-    ;;(native-inputs
-    ;; `(("python-pytest" ,python-pytest)))
-    (home-page "https://github.com/andymccurdy/redis-py")
-    (synopsis "Redis Python client")
-    (description
-     "This package provides a Python interface to the Redis key-value store.")
-    (license license:expat)))
-
-(define-public python2-redis
-  (package-with-python2 python-redis))
-
-(define-public python-rq
-  (package
-    (name "python-rq")
-    (version "0.7.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "rq" version))
-       (sha256
-        (base32 "0gaq5pnh0zy46r8jvygi0ifbvz3pq6i7xla78ijcgjw0x77qzsdh"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     `(("python-click" ,python-click)
-       ("python-redis" ,python-redis)))
-    (home-page "http://python-rq.org/")
-    (synopsis "Simple job queues for Python")
-    (description
-     "RQ (Redis Queue) is a simple Python library for queueing jobs and
-processing them in the background with workers.  It is backed by Redis and it
-is designed to have a low barrier to entry.")
-    (license license:bsd-2)))
-
-(define-public python2-rq
-  (package-with-python2 python-rq))
-
 (define-public python-cython
   (package
     (name "python-cython")
@@ -2813,12 +2619,12 @@ between language specification and implementation aspects.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-        (add-before 'build 'set-environment-variables
-         (lambda* (#:key inputs #:allow-other-keys)
-          (call-with-output-file "site.cfg"
-            (lambda (port)
-              (format port
-                      "[openblas]
+         (add-before 'build 'configure-blas-lapack
+           (lambda* (#:key inputs #:allow-other-keys)
+             (call-with-output-file "site.cfg"
+               (lambda (port)
+                 (format port
+                         "[openblas]
 libraries = openblas
 library_dirs = ~a/lib
 include_dirs = ~a/include
@@ -2829,30 +2635,33 @@ lapack_libs = lapack
 library_dirs = ~a/lib
 include_dirs = ~a/include
 "
-                      (assoc-ref inputs "openblas")
-                      (assoc-ref inputs "openblas")
-                      (assoc-ref inputs "lapack")
-                      (assoc-ref inputs "lapack"))))
-          ;; Make /gnu/store/...-bash-.../bin/sh the default shell, instead of
-          ;; /bin/sh.
-          (substitute* "numpy/distutils/exec_command.py"
-            (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
-            (string-append match-start (assoc-ref inputs "bash") match-end)))
-          ;; Use "gcc" executable, not "cc".
-          (substitute* "numpy/distutils/system_info.py"
-            (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
-             "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
-          #t))
-        ;; Tests can only be run after the library has been installed and not
-        ;; within the source directory.
-        (delete 'check)
-        (add-after 'install 'check
-         (lambda* (#:key outputs inputs #:allow-other-keys)
-           ;; Make installed package available for running the tests
-           (add-installed-pythonpath inputs outputs)
-           (with-directory-excursion "/tmp"
-             (zero? (system* "python" "-c"
-                             "import numpy; numpy.test(verbose=2)"))))))))
+                         (assoc-ref inputs "openblas")
+                         (assoc-ref inputs "openblas")
+                         (assoc-ref inputs "lapack")
+                         (assoc-ref inputs "lapack"))))
+             #t))
+         (add-before 'build 'fix-executable-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
+             ;; instead of /bin/sh.
+             (substitute* "numpy/distutils/exec_command.py"
+               (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
+                (string-append match-start (assoc-ref inputs "bash") match-end)))
+             ;; Use "gcc" executable, not "cc".
+             (substitute* "numpy/distutils/system_info.py"
+               (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
+                "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
+             #t))
+         ;; Tests can only be run after the library has been installed and not
+         ;; within the source directory.
+         (delete 'check)
+         (add-after 'install 'check
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             ;; Make installed package available for running the tests
+             (add-installed-pythonpath inputs outputs)
+             (with-directory-excursion "/tmp"
+               (zero? (system* "python" "-c"
+                               "import numpy; numpy.test(verbose=2)"))))))))
     (home-page "http://www.numpy.org/")
     (synopsis "Fundamental package for scientific computing with Python")
     (description "NumPy is the fundamental package for scientific computing
@@ -2885,6 +2694,49 @@ capabilities.")
 (define-public python2-numpy-next
   (package-with-python2 python-numpy-next))
 
+;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
+;; interest only for legacy code going back to NumPy's predecessor
+;; Numeric.
+(define-public python2-numpy-1.8
+  (package (inherit python2-numpy)
+    (version "1.8.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
+       (file-name (string-append "python2-numpy-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments python2-numpy)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'configure-blas-lapack
+             (lambda* (#:key inputs #:allow-other-keys)
+               (call-with-output-file "site.cfg"
+                 (lambda (port)
+                   (format port
+                           "[openblas]
+libraries = openblas,lapack
+library_dirs = ~a/lib:~a/lib
+include_dirs = ~a/include:~a/include
+"
+                           (assoc-ref inputs "openblas")
+                           (assoc-ref inputs "lapack")
+                           (assoc-ref inputs "openblas")
+                           (assoc-ref inputs "lapack"))))
+               #t))))))
+    (description "NumPy is the fundamental package for scientific computing
+with Python.  It contains among other things: a powerful N-dimensional array
+object, sophisticated (broadcasting) functions, tools for integrating C/C++
+and Fortran code, useful linear algebra, Fourier transform, and random number
+capabilities.  Version 1.8 is the last one to contain the numpy.oldnumeric API
+that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
+Numeric.")
+    (license license:bsd-3)))
+
 (define-public python-munch
   (package
     (name "python-munch")
@@ -2952,7 +2804,7 @@ objects.")
      `(("python-colormath" ,python-colormath)))
     (native-inputs
      `(("python-nose" ,python-nose)))
-    (home-page "http://github.com/jsvine/spectra")
+    (home-page "https://github.com/jsvine/spectra")
     (synopsis "Color scales and color conversion")
     (description
      "This package provides a Python library intended to make color math,
@@ -3673,7 +3525,7 @@ atlas_libs = openblas
                (zero? (system* "python" "-c"
                                "import scipy; scipy.test('full')")))
              #t)))))
-    (home-page "http://www.scipy.org/")
+    (home-page "https://www.scipy.org/")
     (synopsis "The Scipy library provides efficient numerical routines")
     (description "The SciPy library is one of the core packages that make up
 the SciPy stack.  It provides many user-friendly and efficient numerical
@@ -3713,41 +3565,6 @@ as the original project seems to have been abandoned circa 2007.")
 (define-public python2-socksipy-branch
   (package-with-python2 python-socksipy-branch))
 
-(define-public python-sqlalchemy
-  (package
-    (name "python-sqlalchemy")
-    (version "1.0.12")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/S/"
-                          "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
-      (sha256
-       (base32
-        "1l8qclhd0s90w3pvwhi5mjxdwr5j7gw7cjka2fx6f2vqmq7f4yb6"))))
-    (build-system python-build-system)
-    (native-inputs
-     `(("python-cython" ,python-cython) ;for c extensions
-       ("python-pytest" ,python-pytest)
-       ("python-mock"   ,python-mock))) ;for tests
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _ (zero? (system* "py.test")))))))
-    (home-page "http://www.sqlalchemy.org")
-    (synopsis "Database abstraction library")
-    (description
-     "SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that
-gives application developers the full power and flexibility of SQL.  It
-provides a full suite of well known enterprise-level persistence patterns,
-designed for efficient and high-performing database access, adapted into a
-simple and Pythonic domain language.")
-    (license license:x11)))
-
-(define-public python2-sqlalchemy
-  (package-with-python2 python-sqlalchemy))
-
 (define-public python-pycodestyle
   (package
     (name "python-pycodestyle")
@@ -3806,116 +3623,6 @@ multivalue dictionary that retains the order of insertions and deletions.")
 (define-public python2-orderedmultidict
   (package-with-python2 python-orderedmultidict))
 
-(define-public python-flaky
-  (package
-    (name "python-flaky")
-    (version "3.4.0")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "flaky" version))
-              (sha256
-               (base32
-                "18pkmf79rfkfpy1d2rrx3v55nxj762ilyk9rvd6s6dccxw58imsa"))))
-    (build-system python-build-system)
-    (arguments
-     ;; TODO: Tests require 'coveralls' and 'genty' which are not in Guix yet.
-     '(#:tests? #f))
-    (home-page "https://github.com/box/flaky")
-    (synopsis "Automatically rerun flaky tests")
-    (description
-     "Flaky is a plugin for @code{nose} or @code{py.test} that automatically
-reruns flaky tests.
-
-Ideally, tests reliably pass or fail, but sometimes test fixtures must rely
-on components that aren't 100% reliable.  With flaky, instead of removing
-those tests or marking them to @code{@@skip}, they can be automatically
-retried.")
-    (license license:asl2.0)))
-
-(define-public python2-flaky
-  (package-with-python2 python-flaky))
-
-(define-public python-sqlalchemy-utils
-  (package
-    (name "python-sqlalchemy-utils")
-    (version "0.32.13")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "SQLAlchemy-Utils" version))
-        (sha256
-         (base32
-          "0vsib7gidjamzsz6w4s5pdhxzxsrkghjnm4sqwk94igjrl3i5ixj"))))
-    (build-system python-build-system)
-    (arguments
-     '(#:tests? #f)) ; FIXME: Many tests require a running database server.
-       ;; #:phases
-       ;; (modify-phases %standard-phases
-       ;;   (replace 'check
-       ;;     (lambda _
-       ;;       (zero? (system* "py.test" "sqlalchemy_utils" "tests")))))
-    (propagated-inputs
-     `(("python-six" ,python-six)
-       ("python-sqlalchemy" ,python-sqlalchemy)))
-    (native-inputs
-     `(("python-dateutil" ,python-dateutil)
-       ("python-flexmock" ,python-flexmock)
-       ("python-psycopg2" ,python-psycopg2)
-       ("python-pytest" ,python-pytest)
-       ("python-pytz" ,python-pytz)))
-    (home-page "https://github.com/kvesteri/sqlalchemy-utils")
-    (synopsis "Various utility functions for SQLAlchemy")
-    (description
-     "SQLAlchemy-utils provides various utility functions and custom data types
-for SQLAlchemy.  SQLAlchemy is an SQL database abstraction library for Python.
-
-You might also want to install the following optional dependencies:
-@enumerate
-@item @code{python-passlib}
-@item @code{python-babel}
-@item @code{python-cryptography}
-@item @code{python-pytz}
-@item @code{python-psycopg2}
-@item @code{python-furl}
-@item @code{python-flask-babel}
-@end enumerate
-")
-    (license license:bsd-3)))
-
-(define-public python2-sqlalchemy-utils
-  (package-with-python2 python-sqlalchemy-utils))
-
-(define-public python-alembic
-  (package
-    (name "python-alembic")
-    (version "0.9.5")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "alembic" version))
-       (sha256
-        (base32
-         "01gx2syqbaxh4hr9pf7pxhlb6p36qaf99140dy19lsx1paxb9p4b"))))
-    (build-system python-build-system)
-    (native-inputs
-     `(("python-mock" ,python-mock)
-       ("python-pytest-cov" ,python-pytest-cov)))
-    (propagated-inputs
-     `(("python-dateutil" ,python-dateutil)
-       ("python-sqlalchemy" ,python-sqlalchemy)
-       ("python-mako" ,python-mako)
-       ("python-editor" ,python-editor)))
-    (home-page "http://bitbucket.org/zzzeek/alembic")
-    (synopsis
-     "Database migration tool for SQLAlchemy")
-    (description
-     "Alembic is a lightweight database migration tool for usage with the
-SQLAlchemy Database Toolkit for Python.")
-    (license license:expat)))
-
-(define-public python2-alembic
-  (package-with-python2 python-alembic))
-
 (define-public python-autopep8
   (package
   (name "python-autopep8")
@@ -3996,18 +3703,45 @@ Python's distutils.")
 services for your Python modules and applications.")
     (license license:lgpl3+)))
 
+(define-public python-olefile
+  (package
+    (name "python-olefile")
+    (version "0.44")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/decalage2/olefile/archive/v"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1wmxbrhyqjry2000zx0zdhqdqxhgi06nz7sbzjlh222q2zjv1gpj"))))
+    (build-system python-build-system)
+    (home-page
+     "https://www.decalage.info/python/olefileio")
+    (synopsis "Read and write Microsoft OLE2 files.")
+    (description
+     "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
+Storage or Compound Document, Microsoft Office).  It is an improved version of
+the OleFileIO module from PIL, the Python Image Library.")
+    (license license:bsd-3)))
+
+(define-public python2-olefile
+  (package-with-python2 python-olefile))
+
 (define-public python-pillow
   (package
     (name "python-pillow")
-    (version "3.3.3")
+    (version "4.3.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Pillow" version))
-       (patches (search-patches "python-pillow-freetype-2.7-test-failure.patch"))
        (sha256
         (base32
-         "0xkv0p1d73gz0a1qaasf0ai4262g8f334j07vd60bjrxs2wr3nmj"))))
+         "09xmn7rl6840sli2iz1k3fgxfgmri2nqz6vkinmb9mgg8ifp2z59"))
+       (patch-flags '("-p1" "--binary"))
+       (patches (search-patches "python-pillow-fix-failing-tests.patch"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-nose"       ,python-nose)))
@@ -4019,6 +3753,8 @@ services for your Python modules and applications.")
        ("openjpeg" ,openjpeg)
        ("libtiff"  ,libtiff)
        ("libwebp"  ,libwebp)))
+    (propagated-inputs
+     `(("python-olefile" ,python-olefile)))
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (add-after
@@ -4475,35 +4211,6 @@ common operations on files to be invoked on those path objects directly.")
 (define-public python2-pathpy
   (package-with-python2 python-pathpy))
 
-(define-public python-pickleshare
-  (package
-    (name "python-pickleshare")
-    (version "0.5")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/p/"
-                           "pickleshare/pickleshare-" version ".tar.gz"))
-       (sha256
-        (base32 "11ljr90j3p6qswdrbl7p4cjb2i93f6vn0vx9anzpshsx0d2mggn0"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     `(("python-pathpy" ,python-pathpy)))
-    (home-page "https://github.com/vivainio/pickleshare")
-    (synopsis "Tiny key value database with concurrency support")
-    (description
-     "PickleShare is a small ‘shelve’-like datastore with concurrency support.
-Like shelve, a PickleShareDB object acts like a normal dictionary.  Unlike
-shelve, many processes can access the database simultaneously.  Changing a
-value in database is immediately visible to other processes accessing the same
-database.  Concurrency is possible because the values are stored in separate
-files.  Hence the “database” is a directory where all files are governed by
-PickleShare.")
-    (license license:expat)))
-
-(define-public python2-pickleshare
-  (package-with-python2 python-pickleshare))
-
 (define-public python-simplegeneric
   (package
     (name "python-simplegeneric")
@@ -4842,30 +4549,6 @@ computing.")
        `(("python2-mock" ,python2-mock)
          ,@(package-native-inputs ipython))))))
 
-(define-public python-isodate
-  (package
-    (name "python-isodate")
-    (version "0.5.4")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "isodate" version))
-        (sha256
-          (base32
-            "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
-    (build-system python-build-system)
-    (home-page
-      "http://cheeseshop.python.org/pypi/isodate")
-    (synopsis
-      "Python date parser and formatter")
-    (description
-      "Python-isodate is a python module for parsing and formatting
-ISO 8601 dates, time and duration.")
-    (license license:bsd-3)))
-
-(define-public python2-isodate
-  (package-with-python2 python-isodate))
-
 (define-public python-urwid
   (package
     (name "python-urwid")
@@ -4988,49 +4671,6 @@ implementation of D-Bus.")
     ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
     (arguments `(#:tests? #f))))
 
-(define-public python-apsw
-  (package
-    (name "python-apsw")
-    (version "3.9.2-r1")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "apsw" version))
-        (sha256
-          (base32
-           "0w4jb0wpx785qw42r3h4fh7gl5w2968q48i7gygybsfxck8nzffs"))))
-    (build-system python-build-system)
-    (inputs
-      `(("sqlite" ,sqlite)))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'build
-           (lambda _
-             (zero?
-              (system* "python" "setup.py" "build" "--enable-all-extensions"))))
-         (add-after 'build 'build-test-helper
-           (lambda _
-             (zero?
-              (system
-               (string-append "gcc -fPIC -shared -o ./testextension.sqlext "
-                              "-I. -Isqlite3 src/testextension.c") ))))
-         (delete 'check)
-         (add-after 'install 'check
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (add-installed-pythonpath inputs outputs)
-             (zero? (system* "python" "setup.py" "test")))))))
-    (home-page "https://github.com/rogerbinns/apsw/")
-    (synopsis "Another Python SQLite Wrapper")
-    (description "APSW is a Python wrapper for the SQLite
-embedded relational database engine.  In contrast to other wrappers such as
-pysqlite it focuses on being a minimal layer over SQLite attempting just to
-translate the complete SQLite API into Python.")
-    (license license:zlib)))
-
-(define-public python2-apsw
-  (package-with-python2 python-apsw))
-
 (define-public python-lxml
   (package
     (name "python-lxml")
@@ -5082,7 +4722,7 @@ libxml2 and libxslt.")
          (replace 'check
            (lambda _ (zero? (system* "./convert-py3k")))))))
     (home-page
-     "http://www.crummy.com/software/BeautifulSoup/bs4/")
+     "https://www.crummy.com/software/BeautifulSoup/bs4/")
     (synopsis
      "Python screen-scraping library")
     (description
@@ -5741,14 +5381,14 @@ plugins that intend to support Flake8 2.x and 3.x simultaneously.")
 (define-public python-mistune
   (package
     (name "python-mistune")
-    (version "0.7.3")
+    (version "0.8.3")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "mistune" version))
        (sha256
         (base32
-         "04xpk1zvslhq3xpnf01g3ag0dy9wfv4z28p093r8k49vvxlyil11"))))
+         "06b662p6kf46wh2jsabaqhaq4bz1srh2zxkrnx4yg96azlxw645w"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-nose" ,python-nose)
@@ -6085,48 +5725,6 @@ and MAC network addresses.")
 (define-public python2-netaddr
   (package-with-python2 python-netaddr))
 
-(define-public python2-neo4j-driver
-  (package
-    (name "python2-neo4j-driver")
-    ;; NOTE: When upgrading to 1.5.0, please add a python3 variant.
-    (version "1.4.0")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "neo4j-driver" version))
-              (sha256
-               (base32
-                "011r1vh182p8mm83d8dz9rfnc3l7rf7fd00cyrbyfzi71jmc4g98"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:python ,python-2))
-    (home-page "https://neo4j.com/developer/python/")
-    (synopsis "Neo4j driver code written in Python")
-    (description "This package provides the Neo4j Python driver that connects
-to the database using Neo4j's binary protocol.  It aims to be minimal, while
-being idiomatic to Python.")
-    (license license:asl2.0)))
-
-(define-public python2-py2neo
-  (package
-    (name "python2-py2neo")
-    (version "3.1.2")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "py2neo" version))
-              (sha256
-               (base32
-                "1f1q95vqcvlc3nsc33p841swnjdcjazddlq2dzi3qfnjqjrajxw1"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:python ,python-2))
-    (home-page "http://py2neo.org")
-    (synopsis "Library and toolkit for working with Neo4j in Python")
-    (description "This package provides a client library and toolkit for
-working with Neo4j from within Python applications and from the command
-line.  The core library has no external dependencies and has been carefully
-designed to be easy and intuitive to use.")
-    (license license:asl2.0)))
-
 (define-public python-wrapt
   (package
     (name "python-wrapt")
@@ -6154,55 +5752,6 @@ designed to be easy and intuitive to use.")
 (define-public python2-wrapt
   (package-with-python2 python-wrapt))
 
-(define-public python-iso8601
-  (package
-  (name "python-iso8601")
-  (version "0.1.11")
-  (source
-    (origin
-      (method url-fetch)
-      (uri (pypi-uri "iso8601" version))
-      (sha256
-       (base32
-        "0c7gh3lsdjds262h0v1sqc66l7hqgfwbakn96qrhdbl0i3vm5yz8"))))
-  (build-system python-build-system)
-  (native-inputs
-   `(("python-pytest" ,python-pytest)))
-  (home-page "https://bitbucket.org/micktwomey/pyiso8601")
-  (synopsis "Module to parse ISO 8601 dates")
-  (description
-    "This module parses the most common forms of ISO 8601 date strings (e.g.
-@code{2007-01-14T20:34:22+00:00}) into @code{datetime} objects.")
-  (license license:expat)))
-
-(define-public python2-iso8601
-  (package-with-python2 python-iso8601))
-
-(define-public python-monotonic
-  (package
-    (name "python-monotonic")
-    (version "0.3")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (string-append
-               "https://pypi.python.org/packages/source/m/monotonic/monotonic-"
-               version
-               ".tar.gz"))
-        (sha256
-          (base32
-            "0yz0bcbwx8r2c01czzfpbrxddynxyk9k95jj8h6sgcb7xmfvl998"))))
-    (build-system python-build-system)
-    (home-page "https://github.com/atdt/monotonic")
-    (synopsis "Implementation of time.monotonic() for Python 2 & < 3.3")
-    (description
-      "This module provides a monotonic() function which returns the value (in
-fractional seconds) of a clock which never goes backwards.")
-    (license license:asl2.0)))
-
-(define-public python2-monotonic
-  (package-with-python2 python-monotonic))
-
 (define-public python-xlrd
   (package
     (name "python-xlrd")
@@ -6556,7 +6105,7 @@ a hash value.")
     (arguments
      ;; There are no tests.
      `(#:tests? #f))
-    (home-page "http://pypi.python.org/pypi/termcolor")
+    (home-page "https://pypi.python.org/pypi/termcolor")
     (synopsis "ANSII Color formatting for terminal output")
     (description
      "This package provides ANSII Color formatting for output in terminals.")
@@ -6962,6 +6511,7 @@ Jupyter kernels such as IJulia and IRKernel.")
 (define python-jupyter-console-minimal
   (package
     (inherit python-jupyter-console)
+    (name "python-jupyter-console-minimal")
     (arguments
      (substitute-keyword-arguments
          (package-arguments python-jupyter-console)
@@ -7117,31 +6667,6 @@ This allows one to make simple text-mode user interfaces on Unix-like systems")
                  (base32
                   "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
 
-(define-public python-pyrfc3339
-  (package
-    (name "python-pyrfc3339")
-    (version "1.0")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "pyRFC3339" version))
-       (sha256
-        (base32
-         "0dgm4l9y8jiax5cp6yxjd2i27cq8h33sh81n1wfbmnmqb32cdywd"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     `(("python-pytz" ,python-pytz)))
-    (native-inputs
-     `(("python-nose" ,python-nose)))
-    (home-page "https://github.com/kurtraschke/pyRFC3339")
-    (synopsis "Python timestamp library")
-    (description "Python library for generating and parsing RFC 3339-compliant
-timestamps.")
-    (license license:expat)))
-
-(define-public python2-pyrfc3339
-  (package-with-python2 python-pyrfc3339))
-
 (define-public python-configobj
   (package
     (name "python-configobj")
@@ -7378,30 +6903,6 @@ minimal and fast API targeting the following uses:
 (define-public python2-execnet
   (package-with-python2 python-execnet))
 
-(define-public python-trollius-redis
-  (package
-    (name "python-trollius-redis")
-    (version "0.1.4")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "trollius_redis" version))
-        (sha256
-         (base32
-          "0k3vypszmgmaipgw9xscvgm79h2zd6p6ci8gdp5sxl6g5kbqr9fy"))))
-    (build-system python-build-system)
-    ;; TODO: Tests require packaging 'hiredis'.
-    (arguments '(#:tests? #f))
-    (home-page "https://github.com/benjolitz/trollius-redis")
-    (synopsis "Port of asyncio-redis to trollius")
-    (description "@code{trollius-redis} is a Redis client for Python
-  trollius.  It is an asynchronious IO (PEP 3156) implementation of the
-  Redis protocol.")
-    (license license:bsd-2)))
-
-(define-public python2-trollius-redis
-  (package-with-python2 python-trollius-redis))
-
 (define-public python-icalendar
   (package
     (name "python-icalendar")
@@ -7735,7 +7236,7 @@ text.")
 encryption and decryption, signing and verifying signatures, and key
 generation according to PKCS#1 version 1.5.  It can be used as a Python
 library as well as on the command line.")
-   (home-page "http://stuvel.eu/rsa")
+   (home-page "https://stuvel.eu/rsa")
    (license license:asl2.0)))
 
 (define-public python2-rsa
@@ -7994,7 +7495,7 @@ fast xml and html manipulation.")
        ;; but it could be annoying/difficult.
        ;; We can enable tests for the Python 2 version, though, and do below.
        #:tests? #f))
-    (home-page "http://bitbucket.org/runeh/anyjson/")
+    (home-page "https://bitbucket.org/runeh/anyjson/")
     (synopsis
      "Wraps best available JSON implementation in a common interface")
     (description
@@ -8273,33 +7774,6 @@ introspection of @code{zope.interface} instances in code.")
 (define-public python2-sphinx-repoze-autointerface
   (package-with-python2 python-sphinx-repoze-autointerface))
 
-(define-public python-psycopg2
-  (package
-    (name "python-psycopg2")
-    (version "2.7.3.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "psycopg2" version))
-       (sha256
-        (base32
-         "0rda1j02ds6s28752fhmpwg761sh6jsxi1gpczqkrd28cki1cywv"))))
-    (build-system python-build-system)
-    (arguments
-     ;; Tests would require a postgresql database "psycopg2_test"
-     ;; and a running postgresql database management service.
-     `(#:tests? #f)) ; TODO re-enable after providing a test-db.
-    (inputs
-     `(("postgresql" ,postgresql))) ; libpq
-    (home-page "http://initd.org/psycopg/")
-    (synopsis "Python PostgreSQL adapter")
-    (description
-     "psycopg2 is a thread-safe PostgreSQL adapter that implements DB-API 2.0. ")
-    (license license:lgpl3+)))
-
-(define-public python2-psycopg2
-  (package-with-python2 python-psycopg2))
-
 (define-public python-vobject
   (package
     (name "python-vobject")
@@ -8366,7 +7840,7 @@ useful for solving the Assignment Problem.")
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
-    (home-page "http://bitbucket.org/mchaput/whoosh")
+    (home-page "https://bitbucket.org/mchaput/whoosh")
     (synopsis "Full text indexing, search, and spell checking library")
     (description
      "Whoosh is a fast, pure-Python full text indexing, search, and spell
@@ -8436,7 +7910,7 @@ anymore.")
      `(#:python ,python-2))
     (native-inputs
      `(("python2-six" ,python2-six)))
-    (home-page "http://pypi.python.org/pypi/pathlib2/")
+    (home-page "https://pypi.python.org/pypi/pathlib2/")
     (synopsis "Object-oriented file system paths - backport of standard
 pathlib module")
     (description "The goal of pathlib2 is to provide a backport of standard
@@ -8934,33 +8408,6 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc).
 (define-public python2-tblib
   (package-with-python2 python-tblib))
 
-(define-public python-sqlparse
-  (package
-    (name "python-sqlparse")
-    (version "0.2.4")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "sqlparse" version))
-              (sha256
-               (base32
-                "1v3xh0bkfhb262dbndgzhivpnhdwavdzz8jjhx9vx0xbrx2880nf"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _ (zero? (system* "py.test")))))))
-    (native-inputs
-     `(("python-pytest" ,python-pytest)))
-    (home-page "https://github.com/andialbrecht/sqlparse")
-    (synopsis "Non-validating SQL parser")
-    (description "Sqlparse is a non-validating SQL parser for Python.  It
-provides support for parsing, splitting and formatting SQL statements.")
-    (license license:bsd-3)))
-
-(define-public python2-sqlparse
-  (package-with-python2 python-sqlparse))
-
 (define-public python-greenlet
   (package
     (name "python-greenlet")
@@ -9277,34 +8724,6 @@ objects, patterned after the Mocha library for Ruby.")
 (define-public python2-chai
   (package-with-python2 python-chai))
 
-(define-public python-arrow
-  (package
-    (name "python-arrow")
-    (version "0.10.0")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "arrow" version))
-              (sha256
-               (base32
-                "08n7q2l69hlainds1byd4lxhwrq7zsw7s640zkqc3bs5jkq0cnc0"))))
-    (build-system python-build-system)
-    (native-inputs
-     `(;; For testing
-       ("python-chai" ,python-chai)
-       ("python-simplejson" ,python-simplejson)))
-    (propagated-inputs
-     `(("python-dateutil" ,python-dateutil)))
-    (home-page "https://github.com/crsmithdev/arrow/")
-    (synopsis "Dates and times for Python")
-    (description
-     "Arrow is a Python library to creating, manipulating, formatting and
-converting dates, times, and timestamps.  It implements and updates the
-datetime type.")
-    (license license:asl2.0)))
-
-(define-public python2-arrow
-  (package-with-python2 python-arrow))
-
 (define-public python-inflection
   (package
     (name "python-inflection")
@@ -9577,38 +8996,17 @@ collections of data.")
 (define-public python2-backpack
   (package-with-python2 python-backpack))
 
-(define-public python-flexmock
-  (package
-    (name "python-flexmock")
-    (version "0.10.2")
-    (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "flexmock" version))
-              (sha256
-               (base32
-                "0arc6njvs6i9v9hgvzk5m50296g7zy5m9d7pyb43vdsdgxrci5gy"))))
-    (build-system python-build-system)
-    (home-page "https://flexmock.readthedocs.org")
-    (synopsis "Testing library for Python")
-    (description
-     "flexmock is a testing library for Python that makes it easy to create
-mocks, stubs and fakes.")
-    (license license:bsd-3)))
-
-(define-public python2-flexmock
-  (package-with-python2 python-flexmock))
-
 (define-public python-prompt-toolkit
  (package
   (name "python-prompt-toolkit")
-  (version "1.0.9")
+  (version "1.0.15")
   (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
       (sha256
         (base32
-          "172r15k9kwdw2lnajvpz1632dd16nqz1kcal1p0lq5ywdarj6rfd"))))
+          "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))
   (build-system python-build-system)
   (arguments
    '(#:tests? #f)) ; The test suite uses some Windows-specific data types.
@@ -9969,43 +9367,6 @@ discovery, monitoring and configuration.")
 (define-public python2-schematics
   (package-with-python2 python-schematics))
 
-(define-public python-freezegun
-  (package
-    (name "python-freezegun")
-    (version "0.3.8")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "freezegun" version))
-        (sha256
-          (base32
-            "1sf38d3ibv1jhhvr52x7dhrsiyqk1hm165dfv8w8wh0fhmgxg151"))))
-    (build-system python-build-system)
-    (native-inputs
-     `(("python-mock" ,python-mock)
-       ("python-nose" ,python-nose)
-       ("python-coverage" ,python-coverage)))
-    (propagated-inputs
-     `(("python-six" ,python-six)
-       ("python-dateutil" ,python-dateutil)))
-    (arguments
-     `(#:phases (modify-phases %standard-phases
-        ;; The tests are normally executed via `make test`, but the PyPi
-        ;; package does not include the Makefile.
-        (replace 'check
-          (lambda _
-            (zero? (system* "nosetests" "./tests/")))))))
-    (home-page "https://github.com/spulec/freezegun")
-    (synopsis "Test utility for mocking the datetime module")
-    (description
-      "FreezeGun is a library that allows your python tests to travel through
-time by mocking the datetime module.")
-    (license license:asl2.0)))
-
-(define-public python2-freezegun
-  (package-with-python2 python-freezegun))
-
-
 (define-public python-odfpy
   (package
     (name "python-odfpy")
@@ -10430,31 +9791,6 @@ useful as a validator for JSON data.")
 (define-public python2-validictory
   (package-with-python2 python-validictory))
 
-(define-public python-aniso8601
-  (package
-    (name "python-aniso8601")
-    (version "1.3.0")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "aniso8601" version))
-        (sha256
-          (base32
-            "1waj54iv3n3lw1fapbz8a93yjgrybgpc86wif5baxdh1arpj9df3"))))
-    (build-system python-build-system)
-    (propagated-inputs
-     `(("python-dateutil" ,python-dateutil)))
-    (home-page
-      "https://bitbucket.org/nielsenb/aniso8601")
-    (synopsis
-      "Python library for parsing ISO 8601 strings")
-    (description
-      "This package contains a library for parsing ISO 8601 datetime strings.")
-    (license license:bsd-3)))
-
-(define-public python2-aniso8601
-  (package-with-python2 python-aniso8601))
-
 (define-public python-pyev
   (package
     (name "python-pyev")
@@ -10537,32 +9873,6 @@ PNG, JPEG, JPEG2000 and GIF files in pure Python.")
     (description "This package provides console text coloring for Python.")
     (license license:bsd-3)))
 
-(define-public python-sadisplay
-  (package
-    (name "python-sadisplay")
-    (version "0.4.6")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "sadisplay" version))
-      (sha256
-        (base32
-          "0zqad2fl7q26p090qmqgmxbm6iwgf9zij1w8da1g3wdgjj72ql05"))))
-    (build-system python-build-system)
-    (propagated-inputs
-      `(("python-sqlalchemy" ,python-sqlalchemy)))
-    (native-inputs
-      `(("python-nose" ,python-nose)))
-    (home-page "https://bitbucket.org/estin/sadisplay")
-    (synopsis "SQLAlchemy schema displayer")
-    (description "This package provides a program to build Entity
-Relationship diagrams from a SQLAlchemy model (or directly from the
-database).")
-    (license license:bsd-3)))
-
-(define-public python2-sadisplay
-  (package-with-python2 python-sadisplay))
-
 (define-public python-argcomplete
   (package
     (name "python-argcomplete")
@@ -10663,7 +9973,7 @@ Features:
 (define-public python-dulwich
   (package
     (name "python-dulwich")
-    (version "0.16.3")
+    (version "0.18.6")
     (source
       (origin
         (method url-fetch)
@@ -10671,7 +9981,8 @@ Features:
                             "dulwich-" version ".tar.gz")
                    (pypi-uri "dulwich" version)))
         (sha256
-          (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als"))))
+          (base32
+           "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -10729,7 +10040,7 @@ protocols written in pure Python.")
              (zero? (system* "python" "test/test_pbkdf2.py")))))))
     (propagated-inputs
      `(("python-pycrypto" ,python-pycrypto)))  ; optional
-    (home-page "http://www.dlitz.net/software/python-pbkdf2/")
+    (home-page "https://www.dlitz.net/software/python-pbkdf2/")
     (synopsis "Password-based key derivation")
     (description "This module implements the password-based key derivation
 function, PBKDF2, specified in RSA PKCS#5 v2.0.
@@ -10815,7 +10126,7 @@ to ansi-escaped strings suitable for display in a terminal.")
        ("python-nose" ,python-nose)))
     (propagated-inputs
      `(("python-six" ,python-six)))
-    (home-page "http://github.com/ralphbean/ansi2html")
+    (home-page "https://github.com/ralphbean/ansi2html")
     (synopsis "Convert ANSI-decorated console output to HTML")
     (description
      "@command{ansi2html} is a Python library and command line utility for
@@ -11693,93 +11004,6 @@ several utilities, as well as an API for building localization tools.")
 (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-packaging
   (package
     (name "python-packaging")
@@ -11812,27 +11036,6 @@ information.")
 (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-relatorio
   (package
     (name "python-relatorio")
@@ -12094,7 +11297,7 @@ applying JSON Patches according to RFC 6902.")
        (base32
         "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
     (build-system python-build-system)
-    (home-page "http://pypi.python.org/pypi/rfc3987")
+    (home-page "https://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).")
@@ -12115,7 +11318,7 @@ validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
        (base32
         "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
     (build-system python-build-system)
-    (home-page "http://github.com/syrusakbary/validate_email")
+    (home-page "https://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.")
@@ -12278,7 +11481,7 @@ from your Flask project.  It is a fork of Flask-Swagger.")
      `(("python-jsonschema" ,python-jsonschema)
        ("python-six" ,python-six)))
     (home-page
-     "http://github.com/Yelp/swagger_spec_validator")
+     "https://github.com/Yelp/swagger_spec_validator")
     (synopsis "Validation of Swagger specifications")
     (description "@code{swagger_spec_validator} provides a library for
 validating Swagger API specifications.")
@@ -12411,6 +11614,22 @@ related APIs.  The binding is created using the standard @code{ctypes}
 library.")
    (license license:bsd-3)))
 
+(define-public python2-pyopengl-accelerate
+  (package
+    (inherit python2-pyopengl)
+    (name "python2-pyopengl-accelerate")
+    (version "3.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "PyOpenGL-accelerate" version))
+       (sha256
+        (base32
+         "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
+    (synopsis "Acceleration code for PyOpenGL")
+    (description
+     "This is the Cython-coded accelerator module for PyOpenGL.")))
+
 (define-public python-rencode
   (package
    (name "python-rencode")
@@ -12747,3 +11966,217 @@ services.")
 
 (define-public python2-jsonrpclib-pelix
   (package-with-python2 python-jsonrpclib-pelix))
+
+(define-public python-setuptools-scm-git-archive
+  (package
+    (name "python-setuptools-scm-git-archive")
+    (version "1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "setuptools_scm_git_archive" version))
+       (sha256
+        (base32
+         "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest-3.0" ,python-pytest-3.0)))
+    (propagated-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
+    (synopsis "Setuptools_scm plugin for git archives")
+    (description
+     "The setuptools_scm_git_archive package is a plugin to
+setuptools_scm, which supports obtaining versions from git archives that
+belong to tagged versions.")
+    (license license:expat)))
+
+(define-public python2-setuptools-scm-git-archive
+  (package-with-python2 python-setuptools-scm-git-archive))
+
+(define-public python-pyclipper
+  (package
+    (name "python-pyclipper")
+    (version "1.0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pyclipper" version ".zip"))
+       (sha256
+        (base32
+         "1zpmwv3bya3j984y5cf9x9d5108kf6mxldcba68wiq0frv5qrssw"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)); 8 Tests fail, 37 succeed
+    (propagated-inputs
+     `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
+    (native-inputs
+     `(("unzip" ,unzip)))
+    (home-page "https://github.com/greginvm/pyclipper")
+    (synopsis "Wrapper for Angus Johnson's Clipper library")
+    (description
+     "Pyclipper is a Cython wrapper for the C++ translation of the
+  Angus Johnson's polygon clipping Clipper library (ver. 6.2.1).")
+    (license license:expat)))
+
+(define-public python2-pyclipper
+  (package-with-python2 python-pyclipper))
+
+(define-public python2-booleanoperations
+  (package
+    (name "python2-booleanoperations")
+    (version "0.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "booleanOperations" version ".zip"))
+       (sha256
+        (base32
+         "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2))
+    (native-inputs
+     `(("unzip" ,unzip)
+       ("python2-pytest-3.0" ,python2-pytest-3.0)
+       ("python2-pytest-runner" ,python2-pytest-runner)))
+    (propagated-inputs
+     `(("python-fonttools" ,python2-fonttools)
+       ("python-pyclipper" ,python2-pyclipper)
+       ("python-ufolib" ,python2-ufolib)))
+    (home-page "https://github.com/typemytype/booleanOperations")
+    (synopsis "Boolean operations on paths")
+    (description
+     "BooleanOperations provides a Python library that enables
+boolean operations on paths.")
+    (license license:expat)))
+
+(define-public python-tempdir
+  (package
+    (name "python-tempdir")
+    (version "0.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "tempdir" version))
+       (sha256
+        (base32
+         "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
+    (build-system python-build-system)
+    (home-page "https://pypi.org/project/tempdir/")
+    (arguments
+     ;; the package has no tests
+     '(#:tests? #f))
+    (synopsis "Python library for managing temporary directories")
+    (description
+     "This library manages temporary directories that are automatically
+deleted with all their contents when they are no longer needed.  It is
+particularly convenient for use in tests.")
+    (license license:expat)))
+
+(define-public python2-tempdir
+  (package-with-python2 python-tempdir))
+
+(define-public python-activepapers
+  (package
+    (name "python-activepapers")
+    (version "0.2.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ActivePapers.Py" version))
+       (sha256
+        (base32
+         "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:modules ((ice-9 ftw)
+                  (srfi srfi-1)
+                  (guix build utils)
+                  (guix build python-build-system))
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'delete-python2-code
+           (lambda _
+             (for-each delete-file
+                       '("lib/activepapers/builtins2.py"
+                         "lib/activepapers/standardlib2.py"
+                         "lib/activepapers/utility2.py"))))
+         (replace 'check
+           (lambda _
+             ;; Deactivate the test cases that download files
+             (setenv "NO_NETWORK_ACCESS" "1")
+             ;; For some strange reason, some tests fail if nosetests runs all
+             ;; test modules in a single execution. They pass if each test
+             ;; module is run individually.
+             (for-each (lambda (filename)
+                         (invoke "nosetests"
+                                 (string-append "tests/" filename)))
+                       (scandir "tests"
+                                (lambda (filename)
+                                  (string-suffix? ".py" filename)))))))))
+    (native-inputs
+     `(("python-tempdir" ,python-tempdir)
+       ("python-nose" ,python-nose)))
+    (propagated-inputs
+     `(("python-h5py" ,python-h5py)))
+    (home-page "http://www.activepapers.org/")
+    (synopsis "Executable papers for scientific computing")
+    (description
+     "ActivePapers is a tool for working with executable papers, which
+combine data, code, and documentation in single-file packages,
+suitable for publication as supplementary material or on repositories
+such as figshare or Zenodo.")
+    (properties `((python2-variant . ,(delay python2-activepapers))))
+    (license license:bsd-3)))
+
+(define-public python2-activepapers
+  (let ((base (package-with-python2
+               (strip-python2-variant python-activepapers))))
+    (package
+      (inherit base)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (delete 'delete-python2-code)
+             (add-after 'unpack 'delete-python3-code
+               (lambda _
+                 (for-each delete-file
+                           '("lib/activepapers/builtins3.py"
+                             "lib/activepapers/standardlib3.py"
+                             "lib/activepapers/utility3.py")))))))))))
+
+(define-public python-semver
+  (package
+    (name "python-semver")
+    (version "2.7.9")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "semver" version))
+        (sha256
+          (base32
+            "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-test-requirements
+           (lambda _
+             (substitute* "setup.py"
+               ;; Our Python is new enough.
+               (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
+             #t)))))
+    (native-inputs
+     `(("python-tox" ,python-tox)
+       ("python-virtualenv" ,python-virtualenv)))
+    (home-page "https://github.com/k-bx/python-semver")
+    (synopsis "Python helper for Semantic Versioning")
+    (description "This package provides a Python library for
+@url{Semantic Versioning, http://semver.org/}.")
+    (license license:bsd-3)))
+
+(define-public python2-semver
+  (package-with-python2 python-semver))