gnu: Add python2-rope.
[jackhill/guix/guix.git] / gnu / packages / python.scm
index f8d426a..602da2d 100644 (file)
@@ -1,13 +1,13 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
-;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
@@ -16,7 +16,9 @@
 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
-;;; Copyright © 2015 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
+;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 (define-module (gnu packages python)
   #:use-module ((guix licenses)
                 #:select (asl2.0 bsd-4 bsd-3 bsd-2 non-copyleft cc0 x11 x11-style
-                          gpl2 gpl2+ gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
+                          gpl2 gpl2+ gpl3 gpl3+ lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3+ agpl3+
                           isc mpl2.0 psfl public-domain repoze unlicense x11-style
                           zpl2.1))
   #:use-module ((guix licenses) #:select (expat zlib) #:prefix license:)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages attr)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages compression)
@@ -68,6 +71,7 @@
   #:use-module (gnu packages texlive)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages base)
   #:use-module (gnu packages xml)
@@ -75,6 +79,8 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages zip)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages pcre)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
@@ -85,7 +91,7 @@
   #:use-module (guix build-system trivial)
   #:use-module (srfi srfi-1))
 
-(define-public python-2
+(define-public python-2.7
   (package
     (name "python")
     (version "2.7.10")
       (sha256
        (base32
         "1h7zbrf9pkj29hlm18b10548ch9757f75m64l47sy75rh43p7lqw"))
-      (patches (map search-patch
-                    '("python-2.7-search-paths.patch"
-                      "python-2-deterministic-build-info.patch"
-                      "python-2.7-source-date-epoch.patch")))))
+      (patches (search-patches
+                "python-2.7-search-paths.patch"
+                "python-2-deterministic-build-info.patch"
+                "python-2.7-source-date-epoch.patch"))))
     (outputs '("out"
                "tk"))                     ;tkinter; adds 50 MiB to the closure
     (build-system gnu-build-system)
@@ -257,19 +263,22 @@ packages; exception-based error handling; and very high level dynamic
 data types.")
     (license psfl)))
 
-(define-public python
+;; Current 2.x version.
+(define-public python-2 python-2.7)
+
+(define-public python-3.4
   (package (inherit python-2)
     (version "3.4.3")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.python.org/ftp/python/"
                                   version "/Python-" version ".tar.xz"))
-              (patches (map search-patch
-                            '("python-fix-tests.patch"
-                              ;; XXX Try removing this patch for python > 3.4.3
-                              "python-disable-ssl-test.patch"
-                              "python-3-deterministic-build-info.patch"
-                              "python-3-search-paths.patch")))
+              (patches (search-patches
+                        "python-fix-tests.patch"
+                        ;; XXX Try removing this patch for python > 3.4.3
+                        "python-disable-ssl-test.patch"
+                        "python-3-deterministic-build-info.patch"
+                        "python-3-search-paths.patch"))
               (patch-flags '("-p0"))
               (sha256
                (base32
@@ -283,6 +292,12 @@ data types.")
                                         (version-major+minor version)
                                         "/site-packages"))))))))
 
+;; Current 3.x version.
+(define-public python-3 python-3.4)
+
+;; Current major version.
+(define-public python python-3)
+
 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
 ;; Python (Tk -> libxcb -> Python.)
 
@@ -331,8 +346,8 @@ data types.")
                   (lambda (old new)
                     (symlink (string-append python old)
                              (string-append bin "/" new)))
-                  `("python3", "pydoc3", "idle3")
-                  `("python",  "pydoc",  "idle"))))))
+                  `("python3" ,"pydoc3" ,"idle3")
+                  `("python"  ,"pydoc"  ,"idle"))))))
     (synopsis "Wrapper for the Python 3 commands")
     (description
      "This package provides wrappers for the commands of Python@tie{}3.x such
@@ -450,17 +465,14 @@ John the Ripper).")
 (define-public python-paramiko
   (package
     (name "python-paramiko")
-    (version "1.15.2")
+    (version "1.16.0")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/p/paramiko/paramiko-"
-             version
-             ".tar.gz"))
+       (uri (pypi-uri "paramiko" version))
        (sha256
         (base32
-         "0mbfzm9zlrz6mla9xakrm8wkll3x035f9rj3c5pbgjzfldqscmjg"))))
+         "14k8z7ndc3zk5xivnm4d8lncchx475ll5izpf8vmfbq7rp9yp5rj"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools" ,python-setuptools)))
@@ -483,22 +495,18 @@ Python interface around SSH networking concepts.")
 (define-public python-httplib2
   (package
     (name "python-httplib2")
-    (version "0.9.1")
+    (version "0.9.2")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/h/httplib2/httplib2-"
-             version
-             ".tar.gz"))
+       (uri (pypi-uri "httplib2" version))
        (sha256
         (base32
-         "1xc3clbrf77r0600kja71j7hk1218sjiq0gfmb8vjdajka8kjqxw"))))
+         "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools" ,python-setuptools)))
-    (home-page
-     "https://github.com/jcgregorio/httplib2")
+    (home-page "https://github.com/jcgregorio/httplib2")
     (synopsis "Comprehensive HTTP client library")
     (description
      "A comprehensive HTTP client library supporting many features left out of
@@ -545,17 +553,14 @@ making them easy to handle and incorporate into other protocols.")
 (define-public python-ccm
   (package
     (name "python-ccm")
-    (version "2.0.4.1")
+    (version "2.1.6")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/c/ccm/ccm-"
-             version
-             ".tar.gz"))
+       (uri (pypi-uri "ccm" version))
        (sha256
         (base32
-         "199jw221albs2iv6xczczq88fxnh0aw8hzmys8qkbzkd99dssng9"))))
+         "177dfxsmk3k4cih6fh6v8d91bh4nqx7ns6pc07w7m7i3cvdx3c8n"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools" ,python-setuptools)))
@@ -574,14 +579,14 @@ Cassandra cluster on localhost.")
 (define-public python-pytz
   (package
     (name "python-pytz")
-    (version "2015.7")
+    (version "2016.3")
     (source
      (origin
       (method url-fetch)
-      (uri (pypi-uri "pytz" version))
+      (uri (pypi-uri "pytz" version ".tar.bz2"))
       (sha256
        (base32
-        "1spgdfp1ssya7v3kww7zp71xpj437skpqazcvqr3kr1p1brnw9lr"))))
+        "1mjmrkk4vc5xzppw7fm0pli1nnbj57cvqv7jjv5whcmccyhxz4y1"))))
     (build-system python-build-system)
     (arguments `(#:tests? #f)) ; no test target
     (home-page "http://pythonhosted.org/pytz")
@@ -598,14 +603,14 @@ using Python 2.4 or higher and provides access to the Olson timezone database.")
 (define-public python-babel
   (package
     (name "python-babel")
-    (version "2.1.1")
+    (version "2.3.2")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "Babel" version))
       (sha256
        (base32
-        "0j2jgfzj1a2m39pm2qc36fzr7a6p5ybwndi0xdzhi2p8zw7dbdkz"))))
+        "0k43pi0p1dwpds2w0km3fw92wixzxv2vw7p09capxmjz5cfh23lw"))))
     (build-system python-build-system)
     (inputs
      `(("python-pytz" ,python-pytz)
@@ -657,15 +662,14 @@ and verifies that it matches the intended target hostname.")
 (define-public python-h5py
   (package
     (name "python-h5py")
-    (version "2.4.0")
+    (version "2.6.0")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/h/h5py/h5py-"
-                          version ".tar.gz"))
+      (uri (pypi-uri "h5py" version))
       (sha256
        (base32
-        "0q4f9l8grf6pwp64xbv8bmyxx416s7h4522nnxac056ap3savbps"))))
+        "0df46dg7i7xfking9lp221bfm8dbl974yvlrbi1w7r6m61ac7bxj"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f ; no test target
@@ -686,9 +690,11 @@ and verifies that it matches the intended target hostname.")
     (propagated-inputs
      `(("python-numpy" ,python-numpy)))
     (inputs
-     `(("hdf5" ,hdf5)))
+     `(("hdf5" ,hdf5)
+       ("python-six" ,python-six)))
     (native-inputs
-     `(("python-cython" ,python-cython)))
+     `(("python-cython" ,python-cython)
+       ("python-pkgconfig" ,python-pkgconfig)))
     (home-page "http://www.h5py.org/")
     (synopsis "Read and write HDF5 files from Python")
     (description
@@ -697,21 +703,16 @@ HDF5 library from Python.  The low-level interface is intended to be a
 complete wrapping of the HDF5 API, while the high-level component supports
 access to HDF5 files, datasets and groups using established Python and NumPy
 concepts.")
-    (license bsd-3)))
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-h5py))))))
 
 (define-public python2-h5py
-  (let ((h5py (package-with-python2 python-h5py)))
-    (package (inherit h5py)
-      (propagated-inputs
-       `(("python2-numpy" ,python2-numpy)
-         ,@(alist-delete
-            "python-numpy"
-            (package-propagated-inputs h5py)))))))
+  (package-with-python2 (strip-python2-variant python-h5py)))
 
 (define-public python-lockfile
   (package
     (name "python-lockfile")
-    (version "0.9.1")
+    (version "0.12.2")
     (source
      (origin
        (method url-fetch)
@@ -719,18 +720,25 @@ concepts.")
                            "lockfile-" version ".tar.gz"))
        (sha256
         (base32
-         "0iwif7i84gwpvrnpv4brshdk8j6l77smvknm8k3bg77mj6f5ini3"))))
+         "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
     (build-system python-build-system)
     (arguments '(#:test-target "check"))
+    (native-inputs
+     `(("python-pbr" ,python-pbr)))
     (home-page "http://code.google.com/p/pylockfile/")
     (synopsis "Platform-independent file locking module")
     (description
      "The lockfile package exports a LockFile class which provides a simple
 API for locking files.")
-    (license license:expat)))
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-lockfile))))))
 
 (define-public python2-lockfile
-  (package-with-python2 python-lockfile))
+  (let ((base (package-with-python2 (strip-python2-variant python-lockfile))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-mock
   (package
@@ -839,19 +847,17 @@ etc.).  The package is structured to make adding new modules easy.")
 (define-public python-keyring
   (package
     (name "python-keyring")
-    (version "5.7.1")
+    (version "8.7")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "keyring" version))
       (sha256
        (base32
-        "1h7a1r9ick7wdd0xb5p63413nvjadna2xawrsvmklsl5ddhm5wrx"))))
+        "0482rmi2x6p78wl2kz8qzyq21xz1sbbfwnv5x7dggar4vkwxhzfx"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-setuptools-scm" ,python-setuptools-scm)
-       ("python-mock" ,python-mock)))
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
     (inputs
      `(("python-pycrypto" ,python-pycrypto)))
     (arguments
@@ -863,13 +869,15 @@ etc.).  The package is structured to make adding new modules easy.")
 service from python.  It can be used in any application that needs safe
 password storage.")
     ;; "MIT" and PSF dual license
-    (license x11)))
+    (license x11)
+    (properties `((python2-variant . ,(delay python2-keyring))))))
 
 (define-public python2-keyring
-  (let ((keyring (package-with-python2 python-keyring)))
-    (package (inherit keyring)
-      (inputs
-       `(("python2-pycrypto" ,python2-pycrypto))))))
+  (let ((base (package-with-python2 (strip-python2-variant python-keyring))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-six
   (package
@@ -901,28 +909,31 @@ Python file, so it can be easily copied into your project.")
 (define-public python-dateutil-2
   (package
     (name "python-dateutil")
-    (version "2.4.2")
+    (version "2.5.2")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/p/"
-                          name "/" name "-" version ".tar.gz"))
+      (uri (pypi-uri "python-dateutil" version))
       (sha256
        (base32
-        "0ggbm2z72p0nwjqgvpw8s5bqzwayqiqv2iws0x2a605m3mf4959y"))))
+        "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86"))))
     (build-system python-build-system)
     (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-six" ,python-six)))
+     `(("python-six" ,python-six)))
     (home-page "http://labix.org/python-dateutil")
     (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 bsd-3)))
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-dateutil-2))))))
 
 (define-public python2-dateutil-2
-  (package-with-python2 python-dateutil-2))
+  (let ((base (package-with-python2 (strip-python2-variant python-dateutil-2))))
+    (package
+      (inherit base)
+      (inputs `(("python2-setuptools" ,python2-setuptools)
+                ,@(package-inputs base))))))
 
 (define-public python-dateutil
   (package
@@ -952,52 +963,54 @@ datetime module, available in Python 2.3+.")
 (define-public python-parsedatetime
   (package
     (name "python-parsedatetime")
-    (version "1.5")
+    (version "2.1")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/p/"
-                          "parsedatetime/parsedatetime-" version ".tar.gz"))
+      (uri (pypi-uri "parsedatetime" version))
       (sha256
        (base32
-        "1as0mm4ql3z0324nc9bys2s1ngh507i317p16b79rx86wlmvx9ix"))))
+        "0bdgyw6y3v7bcxlx0p50s8drxsh5bb5cy2afccqr3j90amvpii8p"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
+     `(("python-nose" ,python-nose)
+       ("python-pyicu" ,python-pyicu)))
     (home-page "http://github.com/bear/parsedatetime/")
     (synopsis
      "Parse human-readable date/time text")
     (description
      "Parse human-readable date/time text.")
-    (license asl2.0)))
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-parsedatetime))))))
 
 (define-public python2-parsedatetime
-  (package-with-python2 python-parsedatetime))
+  (let ((base (package-with-python2 (strip-python2-variant python-parsedatetime))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-pandas
   (package
     (name "python-pandas")
-    (version "0.16.2")
+    (version "0.18.1")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "pandas" version))
+       (uri (string-append
+              "https://pypi.python.org/packages/11/09/"
+              "e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/"
+              "pandas-" version ".tar.gz"))
        (sha256
-        (base32 "10agmrkps8bi5948vwpipfxds5kj1d076m9i0nhaxwqiw7gm6670"))))
+        (base32 "1ckpxrvvjj6zxmn68icd9hib8qcpx9b35f6izxnr25br5ilq7r6j"))))
     (build-system python-build-system)
-    (arguments
-     `(;; Three tests fail:
-       ;; - test_read_google
-       ;; - test_read_yahoo
-       ;; - test_month_range_union_tz_dateutil
-       #:tests? #f))
     (propagated-inputs
-     `(("python-numpy" ,python-numpy)
-       ("python-pytz" ,python-pytz)
+     `(("python-numpy" ,python-numpy)))
+    (inputs
+     `(("python-pytz" ,python-pytz)
        ("python-dateutil" ,python-dateutil-2)))
     (native-inputs
-     `(("python-nose" ,python-nose)
-       ("python-setuptools" ,python-setuptools)))
+     `(("python-nose" ,python-nose)))
     (home-page "http://pandas.pydata.org")
     (synopsis "Data structures for data analysis, time series, and statistics")
     (description
@@ -1006,29 +1019,29 @@ structures designed to make working with structured (tabular,
 multidimensional, potentially heterogeneous) and time series data both easy
 and intuitive.  It aims to be the fundamental high-level building block for
 doing practical, real world data analysis in Python.")
-    (license bsd-3)))
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-pandas))))))
 
 (define-public python2-pandas
-  (let ((pandas (package-with-python2 python-pandas)))
-    (package (inherit pandas)
-             (propagated-inputs
-              `(("python2-numpy" ,python2-numpy)
-                ,@(alist-delete "python-numpy"
-                                (package-propagated-inputs pandas)))))))
+  (let ((base (package-with-python2 (strip-python2-variant python-pandas))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-tzlocal
   (package
     (name "python-tzlocal")
-    (version "1.2")
+    (version "1.2.2")
     (source
      (origin
       (method url-fetch)
       (uri (pypi-uri "tzlocal" version))
       (sha256
        (base32
-        "12wsw2fl3adrqrwghasld57bhqdrzn0crblqrci1p5acd0ni53s3"))))
+        "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb"))))
     (build-system python-build-system)
-    (propagated-inputs `(("python-pytz" ,python-pytz)))
+    (inputs `(("python-pytz" ,python-pytz)))
     (home-page "https://github.com/regebro/tzlocal")
     (synopsis
      "Local timezone information for Python")
@@ -1039,44 +1052,6 @@ get the local timezone information, unless you know the zoneinfo name, and
 under several distributions that's hard or impossible to figure out.")
     (license cc0)))
 
-(define-public python-pysam
-  (package
-    (name "python-pysam")
-    (version "0.8.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/p/pysam/pysam-"
-                           version ".tar.gz"))
-       (sha256
-        (base32
-         "1fb6i6hbpzxaxb62kyyp5alaidwhj40f7c6gwbhr6njzlqd5l459"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:tests? #f ; tests are excluded in the manifest
-       #:phases
-       (alist-cons-before
-        'build 'set-flags
-        (lambda _
-          (setenv "LDFLAGS" "-lncurses")
-          (setenv "CFLAGS" "-D_CURSES_LIB=1"))
-        %standard-phases)))
-    (inputs
-     `(("python-cython"     ,python-cython)
-       ("python-setuptools" ,python-setuptools)
-       ("ncurses"           ,ncurses)
-       ("zlib"              ,zlib)))
-    (home-page "https://github.com/pysam-developers/pysam")
-    (synopsis "Python bindings to the SAMtools C API")
-    (description
-     "Pysam is a Python module for reading and manipulating files in the
-SAM/BAM format.  Pysam is a lightweight wrapper of the SAMtools C API.  It
-also includes an interface for tabix.")
-    (license license:expat)))
-
-(define-public python2-pysam
-  (package-with-python2 python-pysam))
-
 (define-public python2-pysqlite
   (package
     (name "python2-pysqlite")
@@ -1170,10 +1145,10 @@ Python 3.3+.")
   (package-with-python2 python-simplejson))
 
 
-(define-public python2-pyicu
+(define-public python-pyicu
   (package
-    (name "python2-pyicu")
-    (version "1.8")
+    (name "python-pyicu")
+    (version "1.9.2")
     (source
      (origin
       (method url-fetch)
@@ -1181,19 +1156,22 @@ Python 3.3+.")
                           version ".tar.gz"))
       (sha256
        (base32
-        "1y361x82lnh9k9srmdx3q92z5iag112z7r5fxm0n1sfwb349yjdw"))))
+        "1diba0g8md614fvm9yf50paiwdkhj6rd7xwf1rg9mc0pxc0hhn4v"))))
     (build-system python-build-system)
     (inputs
      `(("icu4c" ,icu4c)))
-    (arguments
-     `(#:python ,python-2 ; Python 3 works also, but needs special care for
-                          ; linking with libpython3.3m
-       #:tests? #f)) ; no check target
     (home-page "http://pyicu.osafoundation.org/")
     (synopsis "Python extension wrapping the ICU C++ API")
     (description
      "PyICU is a python extension wrapping the ICU C++ API.")
-    (license x11)))
+    (license x11)
+    (properties `((python2-variant . ,(delay python2-pyicu))))))
+
+(define-public python2-pyicu
+  (package
+    (inherit (package-with-python2
+              (strip-python2-variant python-pyicu)))
+    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
 
 (define-public python2-dogtail
   ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
@@ -1292,9 +1270,8 @@ commands.")
               (sha256
                (base32
                 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
-              (patches (map search-patch
-                            (list "pybugz-stty.patch"
-                                  "pybugz-encode-error.patch")))))
+              (patches (search-patches "pybugz-stty.patch"
+                                       "pybugz-encode-error.patch"))))
     (build-system python-build-system)
     (arguments
      `(#:python ,python-2                         ; SyntaxError with Python 3
@@ -1363,15 +1340,14 @@ backported for previous versions of Python from 2.4 to 3.3.")
 (define-public python-parse
   (package
     (name "python-parse")
-    (version "1.6.4")
+    (version "1.6.6")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://pypi.python.org/packages/source/p/"
-                          "parse/parse-" version ".tar.gz"))
+      (uri (pypi-uri "parse" version))
       (sha256
        (base32
-        "0m30q64l6szl7s9mhvqy64w2fdhdn8lb91fmacjiwbv3479cmk57"))))
+        "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -1564,7 +1540,7 @@ code introspection, and logging.")
 (define-public python-pytest
   (package
     (name "python-pytest")
-    (version "2.6.1")
+    (version "2.7.3")
     (source
      (origin
        (method url-fetch)
@@ -1573,7 +1549,7 @@ code introspection, and logging.")
              version ".tar.gz"))
        (sha256
         (base32
-         "0g2w4p0n42wvz8rq4k6gnzpkakgz3g8sfanxk8jrsra9675snkcr"))
+         "1z4yi986f9n0p8qmzmn21m21m8j1x78hk3505f89baqm6pdw7afm"))
        (modules '((guix build utils)))
        (snippet
         ;; One of the tests involves the /usr directory, so it fails.
@@ -1600,30 +1576,33 @@ and many external plugins.")
 (define-public python-pytest-cov
   (package
     (name "python-pytest-cov")
-    (version "2.2.0")
+    (version "2.2.1")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "pytest-cov" version))
         (sha256
-          (base32
-           "1lf9jsmhqk5nc4w3kzwglmdzjvmi7ajvrsnwv826j3bn0wzx8c92"))))
+         (base32
+          "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
     (build-system python-build-system)
-    (propagated-inputs
+    (inputs
      `(("python-coverage" ,python-coverage)
        ("python-pytest" ,python-pytest)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/pytest-dev/pytest-cov")
     (synopsis "Pytest plugin for measuring coverage")
     (description
      "Pytest-cov produces coverage reports.  It supports centralised testing and
 distributed testing in both @code{load} and @code{each} modes.  It also
 supports coverage of subprocesses.")
-  (license license:expat)))
+  (license license:expat)
+  (properties `((python2-variant . ,(delay python2-pytest-cov))))))
 
 (define-public python2-pytest-cov
-  (package-with-python2 python-pytest-cov))
+  (let ((base (package-with-python2 (strip-python2-variant python-pytest-cov))))
+    (package
+      (inherit base)
+      (inputs `(("python2-setuptools" ,python2-setuptools)
+                ,@(package-inputs base))))))
 
 (define-public python-pytest-runner
   (package
@@ -1632,9 +1611,7 @@ supports coverage of subprocesses.")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/p/"
-                           "pytest-runner/pytest-runner-"
-                           version ".tar.gz"))
+       (uri (pypi-uri "pytest-runner" version))
        (sha256
         (base32
          "1nwcqx0l3fv52kv8526wy8ypzghbq96c96di318d98d3wh7a8xg7"))))
@@ -1652,14 +1629,22 @@ supports coverage of subprocesses.")
             #t)))))
     (native-inputs
      `(("python-pytest" ,python-pytest)
-       ("python-setuptools" ,python-setuptools)
        ("python-setuptools-scm" ,python-setuptools-scm)))
-    (home-page "https://bitbucket.org/pytest-dev/pytest-runner")
+    (home-page "https://github.com/pytest-dev/pytest-runner")
     (synopsis "Invoke py.test as a distutils command")
     (description
      "This package provides a @command{pytest-runner} command that
 @file{setup.py} files can use to run tests.")
-    (license license:expat)))
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-pytest-runner))))))
+
+(define-public python2-pytest-runner
+  (let ((base (package-with-python2
+                (strip-python2-variant python-pytest-runner))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python2-pytest-runner
   (package-with-python2 python-pytest-runner))
@@ -1678,10 +1663,10 @@ supports coverage of subprocesses.")
     (build-system python-build-system)
     (native-inputs
      `(("unzip" ,unzip)
-       ("python-setuptools" ,python-setuptools)
        ("python-setuptools-scm" ,python-setuptools-scm)))
-    (propagated-inputs
-     `(("python-execnet" ,python-execnet)
+    (inputs
+     `(("python-apipkg" ,python-apipkg)
+       ("python-execnet" ,python-execnet)
        ("python-pytest" ,python-pytest)
        ("python-py" ,python-py)))
     (home-page
@@ -1695,10 +1680,16 @@ to run tests repeatedly when failed, and the ability to run tests on multiple
 Python interpreters or platforms.  It uses rsync to copy the existing
 program code to a remote location, executes there, and then syncs the
 result back.")
-    (license license:expat)))
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-pytest-xdist))))))
 
 (define-public python2-pytest-xdist
-  (package-with-python2 python-pytest-xdist))
+  (let ((base (package-with-python2
+                (strip-python2-variant python-pytest-xdist))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-scripttest
   (package
@@ -1907,6 +1898,48 @@ and sensible default behaviors into your setuptools run.")
 (define-public python2-pbr-0.11
   (package-with-python2 python-pbr-0.11))
 
+(define-public python-pbr
+  (package
+    (name "python-pbr")
+    (version "1.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://pypi.python.org/packages/source/p/pbr/pbr-"
+               version
+               ".tar.gz"))
+        (sha256
+          (base32
+            "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ;; Most tests seem to use the Internet.
+    (propagated-inputs
+      `(("python-testrepository" ,python-testrepository)
+        ("git" ,git))) ;; pbr actually uses the "git" binary.
+    (inputs
+      `(("python-fixtures" ,python-fixtures)
+        ("python-mimeparse" ,python-mimeparse)
+        ("python-mock" ,python-mock)
+        ("python-setuptools" ,python-setuptools)
+        ("python-six" ,python-six)
+        ("python-sphinx" ,python-sphinx)
+        ("python-testrepository" ,python-testrepository)
+        ("python-testresources" ,python-testresources)
+        ("python-testscenarios" ,python-testscenarios)
+        ("python-testtools" ,python-testtools)
+        ("python-virtualenv" ,python-virtualenv)))
+    (home-page "https://launchpad.net/pbr")
+    (synopsis "Change the default behavior of Python’s setuptools")
+    (description
+      "Python Build Reasonableness (PBR) is a library that injects some useful
+and sensible default behaviors into your setuptools run.")
+    (license asl2.0)))
+
+(define-public python2-pbr
+  (package-with-python2 python-pbr))
+
 (define-public python-fixtures
   (package
     (name "python-fixtures")
@@ -2197,9 +2230,8 @@ installed with a newer @code{pip} or with wheel's own command line utility.")
                "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (propagated-inputs
-     `(("python-py" ,python-py)
+     `(("python-setuptools" ,python-setuptools)
+       ("python-py" ,python-py)
        ("python-pytest" ,python-pytest)
        ("python-pytest-cov" ,python-pytest-cov)
        ("python-wheel" ,python-wheel)))
@@ -2345,8 +2377,7 @@ somewhat intelligeble.")
                 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-coverage", python-coverage)
+     `(("python-coverage" ,python-coverage)
        ("python-nose" ,python-nose)
        ("python-mock" ,python-mock)))
     (inputs
@@ -2358,17 +2389,16 @@ somewhat intelligeble.")
     (description
      "Oauthlib is a generic, spec-compliant, thorough implementation of the
 OAuth request-signing logic.")
-    (license bsd-3)))
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-oauthlib))))))
 
 (define-public python2-oauthlib
-  (let ((base (package-with-python2 python-oauthlib)))
+  (let ((base (package-with-python2 (strip-python2-variant python-oauthlib))))
     (package
       (inherit base)
-      (inputs
-       `(("python2-unittest2" ,python2-unittest2)
-         ("python2-cryptography" ,python2-cryptography)
-         ,@(alist-delete "python-cryptography"
-                        (package-inputs base)))))))
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ("python2-unittest2" ,python2-unittest2)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-itsdangerous
   (package
@@ -2384,17 +2414,21 @@ OAuth request-signing logic.")
         (base32
          "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://github.com/mitsuhiko/itsdangerous")
     (synopsis "Python library for passing data to/from untrusted environments")
     (description
      "Itsdangerous provides various helpers to pass trusted data to untrusted
 environments and back.")
-    (license bsd-3)))
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-itsdangerous))))))
 
 (define-public python2-itsdangerous
-  (package-with-python2 python-itsdangerous))
+  (let ((base (package-with-python2
+                (strip-python2-variant python-itsdangerous))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-pyyaml
   (package
@@ -2677,31 +2711,20 @@ sources.")
 (define-public python-feedgenerator
   (package
     (name "python-feedgenerator")
-    (version "20150710.97185b7")
+    (version "1.8")
     (source
-     ;; Using the git checkout for now because license file not added till
-     ;; https://github.com/dmdm/feedgenerator-py3k/commit/97185b7566c240c4bf5ed80db7d6c271204dab39
      (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/dmdm/feedgenerator-py3k.git")
-             (commit "97185b7566c240c4bf5ed80db7d6c271204dab39")))
+       (method url-fetch)
+       (uri (pypi-uri "feedgenerator" version))
        (sha256
         (base32
-         "0dbd6apij5j1923ib905x0srgcyls4wlabqlwp4dzkwmksvnrr2a"))))
-    (arguments
-     `(;; With standard flags, the install phase attempts to create a zip'd
-       ;; egg file, and fails with an error: 'ZIP does not support timestamps
-       ;; before 1980'
-       #:configure-flags '("--single-version-externally-managed"
-                           "--record=feedgenerator.txt")))
+         "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
      `(("python-setuptools" ,python-setuptools)
        ("python-pytz" ,python-pytz)
        ("python-six" ,python-six)))
-    (home-page
-     "https://github.com/dmdm/feedgenerator-py3k.git")
+    (home-page "https://github.com/getpelican/feedgenerator")
     (synopsis
      "Standalone version of Django's Atom/RSS feed generator")
     (description
@@ -2751,9 +2774,7 @@ interested parties to subscribe to events, or \"signals\".")
         (base32
          "1hn94rb4q3zmcq16in055xikal4dba5hfx3zznq7warllcgc9f8k"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (propagated-inputs
+    (inputs
      `(("python-feedgenerator" ,python-feedgenerator)
        ("python-jinja2" ,python-jinja2)
        ("python-pygments" ,python-pygments)
@@ -2943,14 +2964,14 @@ is designed to have a low barrier to entry.")
 (define-public python-cython
   (package
     (name "python-cython")
-    (version "0.23.4")
+    (version "0.24")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Cython" version))
        (sha256
         (base32
-         "13hdffhd37mx3gjby018xl179jaj957fy7kzi01crmimxvn2zi7y"))))
+         "1wd3q97gia3zhsgcdlvxh26hkrf3m53i6r1l4g0yya119264vr3d"))))
     (build-system python-build-system)
     ;; we need the full python package and not just the python-wrapper
     ;; because we need libpython3.3m.so
@@ -3280,7 +3301,7 @@ transcendental functions).")
        (sha256
         (base32
          "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av"))
-       (patches (list (search-patch "matplotlib-setupext-tk.patch")))))
+       (patches (search-patches "matplotlib-setupext-tk.patch"))))
     (build-system python-build-system)
     (outputs '("out" "doc"))
     (propagated-inputs ; the following packages are all needed at run time
@@ -3410,22 +3431,26 @@ toolkits.")
 (define-public python2-pysnptools
   (package
     (name "python2-pysnptools")
-    (version "0.3.5")
+    (version "0.3.9")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pysnptools" version ".zip"))
        (sha256
         (base32
-         "15f4j4w5q603i7mlphb5r6mb1mn33pqg81595fpjp158140yqx7b"))))
+         "1wybggjzz8zw7aav4pjsg2h22xp17a1lghrprza1pxwlm7wf96y2"))))
     (build-system python-build-system)
     (arguments
      `(#:python ,python-2)) ; only Python 2.7 is supported
     (propagated-inputs
      `(("python2-numpy" ,python2-numpy)
        ("python2-scipy" ,python2-scipy)
-       ("python2-pandas" ,python2-pandas)
+       ("python2-pytz" ,python2-pytz)
        ("python2-cython" ,python2-cython)))
+    (inputs
+     `(("python2-dateutil-2" ,python2-dateutil-2)
+       ("python2-pandas" ,python2-pandas)
+       ("python2-six" ,python2-six)))
     (native-inputs
      `(("unzip" ,unzip)
        ("python2-setuptools" ,python2-setuptools)))
@@ -3961,18 +3986,18 @@ PNG, PostScript, PDF, and SVG file output.")
 (define-public python-decorator
   (package
     (name "python-decorator")
-    (version "4.0.6")
+    (version "4.0.9")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "decorator" version))
        (sha256
-        (base32 "1710cwsbwr8fkiq59w2min7rwgdz7ly51yz8l8yh1zbpfxcm8qhw"))))
+        (base32 "1a5vwhflfd9sh3rfb40xlyipldgdzfff6brman57hqv3661jw0lh"))))
     (build-system python-build-system)
     (arguments '(#:tests? #f)) ; no test target
     (native-inputs
      `(("python-setuptools" ,python-setuptools)))
-    (home-page "http://pypi.python.org/pypi/decorator/")
+    (home-page "https://pypi.python.org/pypi/decorator/")
     (synopsis "Python module to simplify usage of decorators")
     (description
       "The aim of the decorator module is to simplify the usage of decorators
@@ -4214,15 +4239,14 @@ standard library.")
 (define-public python-traitlets
   (package
     (name "python-traitlets")
-    (version "4.0.0")
+    (version "4.1.0")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/t/"
-                           "traitlets/traitlets-" version ".tar.gz"))
+       (uri (pypi-uri "traitlets" version))
        (sha256
         (base32
-         "0fr3w2xwb46c591dp7zw02bgf4d21mjy9g6rhwc9bwd4ji50n50b"))))
+         "0nxgj8jxlm1kqf8cx2x7vjid05zdgbxpqhjbdl46r8njlpgkh3j4"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -4232,7 +4256,8 @@ standard library.")
      `(("python-ipython-genutils" ,python-ipython-genutils)
        ("python-decorator" ,python-decorator)))
     (native-inputs
-     `(("python-nose" ,python-nose)))
+     `(("python-mock" ,python-mock)
+       ("python-nose" ,python-nose)))
     (home-page "http://ipython.org")
     (synopsis "Configuration system for Python applications")
     (description
@@ -4254,7 +4279,7 @@ without using the configuration machinery.")
     (source
      (origin
        (method url-fetch)
-       (patches (list (search-patch "python-ipython-inputhook-ctype.patch")))
+       (patches (search-patches "python-ipython-inputhook-ctype.patch"))
        (uri (string-append "https://pypi.python.org/packages/source/i/"
                            "ipython/ipython-" version ".tar.gz"))
        (sha256
@@ -4367,17 +4392,14 @@ computing.")
 (define-public python-isodate
   (package
     (name "python-isodate")
-    (version "0.5.1")
+    (version "0.5.4")
     (source
       (origin
         (method url-fetch)
-        (uri (string-append
-              "https://pypi.python.org/packages/source/i/isodate/isodate-"
-              version
-              ".tar.gz"))
+        (uri (pypi-uri "isodate" version))
         (sha256
           (base32
-            "1yqjn0is0p64cmk9xhq4hc6q06jk86d60kg2jws58d78q0qysami"))))
+            "0cafaiwixgpxwh9dsd28qb0dbzsj6xpxjdkyk30ns91ps10mq422"))))
     (build-system python-build-system)
     (inputs
       `(("python-setuptools" ,python-setuptools)))
@@ -4396,17 +4418,14 @@ ISO 8601 dates, time and duration.")
 (define-public python-html5lib
   (package
     (name "python-html5lib")
-    (version "1.0b3")
+    (version "1.0b8")
     (source
       (origin
         (method url-fetch)
-        (uri (string-append
-              "https://pypi.python.org/packages/source/h/html5lib/html5lib-"
-              version
-              ".tar.gz"))
+        (uri (pypi-uri "html5lib" version))
         (sha256
           (base32
-            "1l5i6xzckzx4hnh9qzv9q3kyhkgjx2hsi2k9srgci3qizjmvp6ln"))))
+            "1lknq5j3nh11xrl268ks76zaj0gyzh34v94n5vbf6dk8llzxdx0q"))))
     (build-system python-build-system)
     (propagated-inputs
       `(("python-six" ,python-six))) ; required to "import html5lib"
@@ -4601,67 +4620,6 @@ converts incoming documents to Unicode and outgoing documents to UTF-8.")
               (strip-python2-variant python-beautifulsoup4)))
     (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
 
-(define-public python2-pil
-  (package
-    (name "python2-pil")
-    (version "1.1.7")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (string-append
-              "http://effbot.org/downloads/Imaging-"
-              version ".tar.gz"))
-        (sha256
-          (base32
-            "04aj80jhfbmxqzvmq40zfi4z3cw6vi01m3wkk6diz3lc971cfnw9"))
-       (modules '((guix build utils)))
-       (snippet
-        ;; Adapt to newer freetype. As the package is unmaintained upstream,
-        ;; there is no use in creating a patch and reporting it.
-        '(substitute* "_imagingft.c"
-           (("freetype/")
-            "freetype2/")))))
-    (build-system python-build-system)
-    (inputs
-      `(("freetype" ,freetype)
-        ("libjpeg" ,libjpeg)
-        ("libtiff" ,libtiff)
-        ("python-setuptools" ,python-setuptools)
-        ("zlib" ,zlib)))
-    (arguments
-     ;; Only the fork python-pillow works with Python 3.
-     `(#:python ,python-2
-       #:tests? #f ; no check target
-       #:phases
-         (alist-cons-before
-          'build 'configure
-          ;; According to README and setup.py, manual configuration is
-          ;; the preferred way of "searching" for inputs.
-          ;; lcms is not found, TCL_ROOT refers to the unavailable tkinter.
-          (lambda* (#:key inputs #:allow-other-keys)
-            (let ((jpeg (assoc-ref inputs "libjpeg"))
-                  (zlib (assoc-ref inputs "zlib"))
-                  (tiff (assoc-ref inputs "libtiff"))
-                  (freetype (assoc-ref inputs "freetype")))
-              (substitute* "setup.py"
-                (("JPEG_ROOT = None")
-                 (string-append "JPEG_ROOT = libinclude(\"" jpeg "\")"))
-                (("ZLIB_ROOT = None")
-                 (string-append "ZLIB_ROOT = libinclude(\"" zlib "\")"))
-                (("TIFF_ROOT = None")
-                 (string-append "TIFF_ROOT = libinclude(\"" tiff "\")"))
-                (("FREETYPE_ROOT = None")
-                 (string-append "FREETYPE_ROOT = libinclude(\""
-                                freetype "\")")))))
-          %standard-phases)))
-    (home-page "http://www.pythonware.com/products/pil/")
-    (synopsis "Python Imaging Library")
-    (description "The Python Imaging Library (PIL) adds image processing
-capabilities to the Python interpreter.")
-    (license (x11-style
-               "file://README"
-               "See 'README' in the distribution."))))
-
 (define-public python2-cssutils
   (package
     (name "python2-cssutils")
@@ -4761,15 +4719,13 @@ interfaces in an easy and portable manner.")
 (define-public python-networkx
   (package
     (name "python-networkx")
-    (version "1.9.1")
+    (version "1.11")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/n/networkx/networkx-"
-             version ".tar.gz"))
+       (uri (pypi-uri "networkx" version))
        (sha256
-        (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
+        (base32 "1f74s56xb4ggixiq0vxyfxsfk8p20c7a099lpcf60izv1php03hd"))))
     (build-system python-build-system)
     ;; python-decorator is needed at runtime
     (propagated-inputs
@@ -4812,22 +4768,18 @@ Python style, together with a fast and comfortable execution environment.")
 (define-public python-seaborn
   (package
     (name "python-seaborn")
-    (version "0.5.1")
+    (version "0.7.0")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
-             version ".tar.gz"))
+       (uri (pypi-uri "seaborn" version))
        (sha256
-        (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
+        (base32 "0ibi3xsfm2kysph61mnfy0pf8d5rkgxgrdb0z9nbizgcgdsb5a0m"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pandas" ,python-pandas)
        ("python-matplotlib" ,python-matplotlib)
        ("python-scipy" ,python-scipy)))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
     (synopsis "Statistical data visualization")
     (description
@@ -4835,16 +4787,17 @@ Python style, together with a fast and comfortable execution environment.")
 graphics in Python.  It is built on top of matplotlib and tightly integrated
 with the PyData stack, including support for numpy and pandas data structures
 and statistical routines from scipy and statsmodels.")
-    (license bsd-3)))
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-seaborn))))))
 
 (define-public python2-seaborn
-  (let ((seaborn (package-with-python2 python-seaborn)))
-    (package (inherit seaborn)
-      (propagated-inputs
-       `(("python2-pytz" ,python2-pytz)
-         ("python2-pandas" ,python2-pandas)
-         ("python2-matplotlib" ,python2-matplotlib)
-         ("python2-scipy" ,python2-scipy))))))
+  (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
+    (package
+      (inherit base)
+      (propagated-inputs `(("python2-pytz" ,python2-pytz)
+                           ,@(package-propagated-inputs base)))
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-sympy
   (package
@@ -4940,16 +4893,14 @@ It is written entirely in Python.")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/s/singledispatch/"
-             "singledispatch-" version ".tar.gz"))
+       (uri (pypi-uri "singledispatch" version))
        (sha256
         (base32
          "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools" ,python-setuptools)))
-    (propagated-inputs
+    (inputs
      `(("python-six" ,python-six)))
     (home-page
      "http://docs.python.org/3/library/functools.html#functools.singledispatch")
@@ -4965,20 +4916,18 @@ It is written entirely in Python.")
 (define-public python-tornado
   (package
     (name "python-tornado")
-    (version "4.1")
+    (version "4.3")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/t/tornado/"
-             "tornado-" version ".tar.gz"))
+       (uri (pypi-uri "tornado" version))
        (sha256
-        (base32 "0a12f00h277zbifibnj46wf14801f573irvf6hwkgja5vspd7awr"))))
+        (base32 "1gzgwayl6hmc9jfcl88bni4jcsk2jcca9dn1rvrfsvnijcjx7hn9"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-certifi" ,python-certifi)))
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
+     `(("python-certifi" ,python-certifi)))
+    (inputs
+     `(("python-backports-abc" ,python-backports-abc)))
     (home-page "http://www.tornadoweb.org/")
     (synopsis "Python web framework and asynchronous networking library")
     (description
@@ -4987,15 +4936,45 @@ originally developed at FriendFeed.  By using non-blocking network I/O,
 Tornado can scale to tens of thousands of open connections, making it ideal
 for long polling, WebSockets, and other applications that require a long-lived
 connection to each user.")
-    (license asl2.0)))
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-tornado))))))
 
 (define-public python2-tornado
-  (let ((tornado (package-with-python2 python-tornado)))
+  (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
     (package (inherit tornado)
       (inputs
        `(("python2-backport-ssl-match-hostname"
           ,python2-backport-ssl-match-hostname)
-         ,@(package-inputs tornado))))))
+         ("python2-singledispatch" ,python2-singledispatch)
+          ,@(package-inputs tornado)))
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs tornado))))))
+
+;; the python- version can be removed with python-3.5
+(define-public python-backports-abc
+  (package
+    (name "python-backports-abc")
+      (version "0.4")
+      (source
+        (origin
+          (method url-fetch)
+          (uri (pypi-uri "backports_abc" version))
+          (sha256
+           (base32
+            "19fh75lni9pb673n2fn505m1rckm0af0szcv5xx1qm1xpa940glb"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (home-page "https://github.com/cython/backports_abc")
+    (synopsis "Backport of additions to the 'collections.abc' module.")
+    (description
+     "Python-backports-abc provides a backport of additions to the
+'collections.abc' module in Python-3.5.")
+    (license psfl)))
+
+(define-public python2-backports-abc
+  (package-with-python2 python-backports-abc))
 
 (define-public python-waf
   (package
@@ -5068,17 +5047,14 @@ applications.")
 (define-public python-pep8
   (package
     (name "python-pep8")
-    (version "1.6.2")
+    (version "1.7.0")
     (source
       (origin
         (method url-fetch)
-        (uri (string-append
-               "https://pypi.python.org/packages/source/p/pep8/pep8-"
-               version
-               ".tar.gz"))
+        (uri (pypi-uri "pep8" version))
         (sha256
           (base32
-            "1zybkcdw1sx84dvkfss96nhykqg9bc0cdpwpl4k9wlxm61bf7dxq"))))
+            "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
     (build-system python-build-system)
     (inputs
       `(("python-setuptools" ,python-setuptools)))
@@ -5119,20 +5095,19 @@ PEP 8.")
 (define-public python-mccabe
   (package
     (name "python-mccabe")
-    (version "0.3.1")
+    (version "0.4.0")
     (source
       (origin
         (method url-fetch)
-        (uri (string-append
-               "https://pypi.python.org/packages/source/m/mccabe/mccabe-"
-               version
-               ".tar.gz"))
+        (uri (pypi-uri "mccabe" version))
         (sha256
           (base32
-            "05ix3vdv5hjk4irl97n2n3c4g1vqvz7dbmkzs13f3bx97bxsczjz"))))
+            "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
     (build-system python-build-system)
     (inputs
-      `(("python-setuptools" ,python-setuptools)))
+      `(("python-pytest" ,python-pytest)
+        ("python-pytest-runner" ,python-pytest-runner)
+        ("python-setuptools" ,python-setuptools)))
     (home-page "https://github.com/flintwork/mccabe")
     (synopsis "McCabe checker, plugin for flake8")
     (description
@@ -5152,7 +5127,8 @@ complexity of Python source code.")
         (uri (pypi-uri "mccabe" version))
         (sha256
           (base32
-            "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
+            "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))
+    (inputs `(("python-setuptools" ,python-setuptools)))))
 
 (define-public python2-mccabe-0.2.1
   (package-with-python2 python-mccabe-0.2.1))
@@ -5198,19 +5174,19 @@ complexity of Python source code.")
 (define-public python-flake8
   (package
     (name "python-flake8")
-    (version "2.5.1")
+    (version "2.5.4")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "flake8" version))
         (sha256
           (base32
-            "00sn2g5ydriv5anbipcrprpv797kh4q8rfa75w3fc7v7n14fv2j4"))))
+            "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
     (build-system python-build-system)
     (inputs
       `(("python-setuptools" ,python-setuptools)
-        ("python-pep8" ,python-pep8-1.5.7)
-        ("python-pyflakes" ,python-pyflakes-0.8.1)
+        ("python-pep8" ,python-pep8)
+        ("python-pyflakes" ,python-pyflakes)
         ("python-mccabe" ,python-mccabe)
         ("python-mock" ,python-mock)
         ("python-nose" ,python-nose)))
@@ -5344,23 +5320,20 @@ pseudo terminal (pty), and interact with both the process and its pty.")
 (define-public python-terminado
   (package
     (name "python-terminado")
-    (version "0.5")
+    (version "0.6")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/t/terminado/terminado-"
-             version ".tar.gz"))
+       (uri (pypi-uri "terminado" version))
        (sha256
         (base32
-         "1dkmp1n8dj5v1jl9mfrq8lwyc7dsfrvcmz2bgkpg315sy7pr7s33"))))
+         "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-tornado" ,python-tornado)
        ("python-ptyprocess" ,python-ptyprocess)))
-    (inputs
-     `(("python-setuptools" ,python-setuptools)
-       ("python-nose" ,python-nose)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -5371,17 +5344,19 @@ pseudo terminal (pty), and interact with both the process and its pty.")
     (synopsis "Terminals served to term.js using Tornado websockets")
     (description "This package provides a Tornado websocket backend for the
 term.js Javascript terminal emulator library.")
-    (license bsd-2)))
+    (license bsd-2)
+    (properties `((python2-variant . ,(delay python2-terminado))))))
 
 (define-public python2-terminado
-  (let ((terminado (package-with-python2 python-terminado)))
+  (let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
     (package (inherit terminado)
-             (propagated-inputs
-              `(("python2-tornado" ,python2-tornado)
-                ("python2-backport-ssl-match-hostname"
-                 ,python2-backport-ssl-match-hostname)
-                ,@(alist-delete "python-tornado"
-                                (package-propagated-inputs terminado)))))))
+      (propagated-inputs
+       `(("python2-backport-ssl-match-hostname"
+          ,python2-backport-ssl-match-hostname)
+          ,@(package-propagated-inputs terminado)))
+      (native-inputs
+       `(("python2-setuptools" ,python2-setuptools)
+         ,@(package-native-inputs terminado))))))
 
 (define-public python-fonttools
   (package
@@ -5417,16 +5392,16 @@ from an XML-based format.")
 (define-public python-ly
   (package
     (name "python-ly")
-    (version "0.9.3")
+    (version "0.9.4")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/p/python-ly/python-ly-"
-             version ".tar.gz"))
+       (uri (string-append "https://pypi.python.org/packages/57/4f/"
+                           "889579244947368f28eda66b782331b1e75f83fd72e63f9ece93cd7a18f9"
+                           "/python-ly-" version ".tar.gz"))
        (sha256
         (base32
-         "1y6ananq8fia4y4m5id6gvsrm68bzpzd1y46pfzvawic0wjg2l0l"))))
+         "0g6n288l83sfwavxh1aryi0aqvsr3sp7v6f903mckwqa4scpky62"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools" ,python-setuptools)))
@@ -5468,7 +5443,7 @@ should be stored on various operating systems.")
 (define-public python-llfuse
   (package
     (name "python-llfuse")
-    (version "0.41")
+    (version "1.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -5476,7 +5451,7 @@ should be stored on various operating systems.")
                     "llfuse-" version ".tar.bz2"))
               (sha256
                (base32
-                "0yzy8ixpmxk00kdq6lx5vvwbs0n6s59qnja5q0js2ahbqyxiz2hb"))))
+                "1li7q04ljrvwharw4fblcbfhvk6s0l3lnv8yqb4c22lcgbkiqlps"))))
     (build-system python-build-system)
     (inputs
      `(("fuse" ,fuse)
@@ -5488,34 +5463,54 @@ should be stored on various operating systems.")
     (description
      "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
     (home-page "https://bitbucket.org/nikratio/python-llfuse/")
-    ;; Python-LLFUSE includes underscore.js, which is MIT (expat) licensed.
-    ;; The rest of the package is licensed under LGPL2.0 or later.
-    (license (list license:expat lgpl2.0+))))
+    (license lgpl2.0+)
+    (properties `((python2-variant . ,(delay python2-llfuse))))))
 
 (define-public python2-llfuse
-  (package-with-python2 python-llfuse))
+  (package (inherit (package-with-python2
+                 (strip-python2-variant python-llfuse)))
+    (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
+
+;; For attic-0.16
+(define-public python-llfuse-0.41
+  (package (inherit python-llfuse)
+    (version "0.41.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://bitbucket.org/nikratio/python-llfuse/downloads/"
+                    "llfuse-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
+    ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
+    ;; licensed.  The rest of the package is licensed under LGPL2.0 or later.
+    (license (list license:expat lgpl2.0+))))
 
 (define-public python-msgpack
   (package
     (name "python-msgpack")
-    (version "0.4.6")
+    (version "0.4.7")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://pypi.python.org/packages/source/m/"
-                    "msgpack-python/msgpack-python-" version ".tar.gz"))
+              (uri (pypi-uri "msgpack-python" version))
               (sha256
                (base32
-                "1527c76b6fn4zzkgfq5xvhh7x9a9686g7fjiz717rw5vklf5ik5z"))))
+                "0syd7bs83qs9qmxw540jbgsildbqk4yb57fmrlns1021llli402y"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
     (synopsis "MessagePack (de)serializer")
     (description "MessagePack is a fast, compact binary serialization format,
 suitable for similar data to JSON.  This package provides CPython bindings for
 reading and writing MessagePack data.")
     (home-page "https://pypi.python.org/pypi/msgpack-python/")
-    (license asl2.0)))
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-msgpack))))))
+
+(define-public python2-msgpack
+  (package (inherit (package-with-python2
+                     (strip-python2-variant python-msgpack)))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))))
 
 (define-public python2-msgpack
   (package-with-python2 python-msgpack))
@@ -5852,16 +5847,18 @@ responses, rather than doing any computation.")
 (define-public python-cryptography-vectors
   (package
     (name "python-cryptography-vectors")
-    (version "1.2.2")
+    (version "1.3.2")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/c/"
-                           "cryptography-vectors/cryptography_vectors-"
-                           version ".tar.gz"))
+       (uri (string-append
+              "https://pypi.python.org/packages/"
+              "3f/fd/"
+              "5883a7fdfcdf6edec55c58605be99d8c36ce97a9b729763ea9cf30e761b7"
+              "/cryptography_vectors-" version ".tar.gz"))
        (sha256
         (base32
-         "1zg47fzzn30mgkkbwrxqqcfq9crgabcmxyiy106n9404wbhfjkkl"))))
+         "0ss682bpgzdfy2vam8yhhrx7p5gnw89ydlvaswqp52za8sd8nsh0"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools" ,python-setuptools)))
@@ -5878,14 +5875,18 @@ responses, rather than doing any computation.")
 (define-public python-cryptography
   (package
     (name "python-cryptography")
-    (version "1.2.2")
+    (version "1.3.2")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "cryptography" version))
+       (uri (string-append
+              "https://pypi.python.org/packages/"
+              "04/da/"
+              "35f9a1d34dab5d777f65fb87731288f338ab0ae46a525ffdf0405b573dd0"
+              "/cryptography-" version ".tar.gz"))
        (sha256
         (base32
-         "0rvaha7ymgbqkzbxk7xmj67k5b3hbp8w8cn3m5z776vd22wrq89z"))))
+         "121067qdbzd0ir0nxjdf0kgai7qlsc9yh2xhrj4cavcn4y4gmapv"))))
     (build-system python-build-system)
     (inputs
      `(("openssl" ,openssl)))
@@ -5929,7 +5930,7 @@ message digests and key derivation functions.")
 (define-public python-pyopenssl
   (package
     (name "python-pyopenssl")
-    (version "0.15.1")
+    (version "16.0.0")
     (source
      (origin
        (method url-fetch)
@@ -5937,29 +5938,8 @@ message digests and key derivation functions.")
                            "pyOpenSSL/pyOpenSSL-" version ".tar.gz"))
        (sha256
         (base32
-         "0wnnq15rhj7fhdcd8ycwiw6r6g3w9f9lcy6cigg8226vsrq618ph"))))
+         "0zfijaxlq4vgi6jz0d4i5xq9ygqnyps6br7lmigjhqnh8gp10g9n"))))
     (build-system python-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'fix-tests
-          (lambda* (#:key inputs #:allow-other-keys)
-            (substitute* "OpenSSL/test/test_ssl.py"
-              (("client\\.connect\\(\\('verisign\\.com', 443\\)\\)")
-               "return True")
-              ;; FIXME: disable broken test
-              (("test_set_tmp_ecdh") "disabled__set_tmp_ecdh"))
-            (substitute* "OpenSSL/test/test_crypto.py"
-              (("command = b\"openssl \"")
-               (string-append "command = b\""
-                              (assoc-ref inputs "openssl")
-                              "/bin/openssl" " \""))
-              ;; FIXME: disable four broken tests
-              (("test_der")             "disabled__der")
-              (("test_digest")          "disabled__digest")
-              (("test_get_extension")   "disabled__get_extension")
-              (("test_extension_count") "disabled__extension_count"))
-            #t)))))
     (propagated-inputs
      `(("python-cryptography" ,python-cryptography)
        ("python-six" ,python-six)))
@@ -6117,7 +6097,10 @@ Python's @code{ctypes} foreign function interface (FFI).")
                         #t))))))
     (inputs `(("file" ,file)))
     (self-native-input? #f)
-    (synopsis "Python bindings to the libmagic file type guesser")))
+    (synopsis "Python bindings to the libmagic file type guesser.  Note that
+this module and the python-magic module both provide a \"magic.py\" file;
+these two modules, which are different and were developed separately, both
+serve the same purpose: provide Python bindings for libmagic.")))
 
 (define-public python2-file
   (package-with-python2 python-file))
@@ -6632,16 +6615,14 @@ timestamps.")
 (define-public python-werkzeug
   (package
     (name "python-werkzeug")
-    (version "0.11.2")
+    (version "0.11.5")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://pypi.python.org/packages/source/W/Werkzeug"
-                           "/Werkzeug-" version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (uri (pypi-uri "Werkzeug" version))
        (sha256
         (base32
-         "1gzwn1lkl90f3l1nzzxr7vjhm21qk8f837i8rvny5a209fcrhkzb"))))
+         "0r41xqp4cypzcgsf6zbspbqd272wnzf20igb4w4b5wzfhgqh9nxg"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-pytest" ,python-pytest)))
@@ -6671,7 +6652,7 @@ addon modules.")
                 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
               ;; Patch setup.py so it looks for python-setuptools, which is
               ;; required to parse the keyword 'install_requires' in setup.py.
-              (patches (list (search-patch "python-configobj-setuptools.patch")))))
+              (patches (search-patches "python-configobj-setuptools.patch"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools" ,python-setuptools)
@@ -6763,7 +6744,7 @@ of the SSL peer.")
          (replace 'check
            (lambda _ (zero?
                       (system*
-                       "python" "test_contextlib2.py", "-v")))))))
+                       "python" "test_contextlib2.py" "-v")))))))
     (home-page "http://contextlib2.readthedocs.org/")
     (synopsis "Tools for decorators and context managers")
     (description "This module is primarily a backport of the Python
@@ -6828,19 +6809,26 @@ WebSocket usage in Python programs.")
 (define-public python-atomicwrites
   (package
     (name "python-atomicwrites")
-    (version "0.1.9")
+    (version "1.0.0")
     (source (origin
              (method url-fetch)
              (uri (pypi-uri "atomicwrites" version))
              (sha256
               (base32
-               "08s05h211r07vs66r4din3swrbzb344vli041fihpg34q3lcxpvw"))))
+               "019fa4771q7fb1167yfbh6msdzcqini6v7i59rmf72mzdjd7x5qv"))))
     (build-system python-build-system)
     (synopsis "Atomic file writes in Python")
     (description "Library for atomic file writes using platform dependent tools
 for atomic filesystem operations.")
     (home-page "https://github.com/untitaker/python-atomicwrites")
-    (license license:expat)))
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-atomicwrites))))))
+
+(define-public python2-atomicwrites
+  (package (inherit (package-with-python2
+                     (strip-python2-variant python-atomicwrites)))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))))
 
 (define-public python-requests-toolbelt
   (package
@@ -6910,7 +6898,7 @@ applications.")
               (base32
                "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
     (build-system python-build-system)
-    (propagated-inputs
+    (inputs
      `(("python-pytest" ,python-pytest)))
     (synopsis "Namespace control and lazy-import mechanism")
     (description "With apipkg you can control the exported namespace of a Python
@@ -6940,7 +6928,7 @@ pure Python module that works on virtually all Python versions.")
     (build-system python-build-system)
     (native-inputs
      `(("python-setuptools-scm" ,python-setuptools-scm)))
-    (propagated-inputs
+    (inputs
      `(("python-apipkg" ,python-apipkg)))
     (synopsis "Rapid multi-Python deployment")
     (description "Execnet provides a share-nothing model with
@@ -6977,8 +6965,11 @@ minimal and fast API targetting the following uses:
               (base32
                "1a873fihw4rhshc722j4h6j7g3nj7xpgsna9hhg3zn6ksknnhx5y"))))
     (build-system python-build-system)
-    (propagated-inputs
-     `(("python-execnet" ,python-execnet)))
+    (inputs
+     `(("python-apipkg" ,python-apipkg)
+       ("python-execnet" ,python-execnet)
+       ("python-py" ,python-py)
+       ("python-pytest" ,python-pytest)))
     (synopsis "Py.test plugin with mechanisms for caching across test runs")
     (description "The pytest-cache plugin provides tools to rerun failures from
 the last py.test invocation.")
@@ -7003,12 +6994,11 @@ the last py.test invocation.")
              (zero? (system* "py.test" "--genscript=runtests.py"))
              (zero? (system* "py.test")))))))
     (native-inputs
-     `(("unzip" ,unzip)))
-    (propagated-inputs
      `(("python-pytest" ,python-pytest)
        ("python-requests" ,python-requests)
-       ("python-six" ,python-six)
-       ("python-werkzeug" ,python-werkzeug)))
+       ("python-six" ,python-six)))
+    (inputs
+     `(("python-werkzeug" ,python-werkzeug)))
     (synopsis "Py.test plugin to test server connections locally")
     (description "Pytest-localserver is a plugin for the pytest testing
 framework which enables you to test server connections locally.")
@@ -7240,9 +7230,7 @@ Python at your fingertips, in Lisp form.")
     (build-system python-build-system)
     (arguments
      `(#:test-target "check"))
-    (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
-    (propagated-inputs
+    (inputs
      `(("python-requests" ,python-requests)))
     (home-page "https://github.com/litl/rauth")
     (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
@@ -7250,15 +7238,16 @@ Python at your fingertips, in Lisp form.")
      "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly.  It also
 provides service wrappers for convenient connection initialization and
 authenticated session objects providing things like keep-alive.")
-    (license license:expat)))
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-rauth))))))
 
 (define-public python2-rauth
-  (let ((rauth (package-with-python2 python-rauth)))
-    (package (inherit rauth)
-      (propagated-inputs `(("python2-requests" ,python2-requests)))
-      (native-inputs
-       `(("python2-unittest2", python2-unittest2)
-         ,@(package-native-inputs rauth))))))
+  (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ("python2-unittest2" ,python2-unittest2)
+                       ,@(package-native-inputs base))))))
 
 (define-public python2-functools32
   (package
@@ -7285,9 +7274,9 @@ authenticated session objects providing things like keep-alive.")
 3.2.3 for use with older versions of Python and PyPy.")
     (license license:expat)))
 
-(define-public python-futures
+(define-public python2-futures
   (package
-    (name "python-futures")
+    (name "python2-futures")
     (version "3.0.3")
     (source
       (origin
@@ -7297,8 +7286,9 @@ authenticated session objects providing things like keep-alive.")
          (base32
           "1vcb34dqhzkhbq1957vdjszhhm5y3j9ba88dgwhqx2zynhmk9qig"))))
     (build-system python-build-system)
+    (arguments `(#:python ,python-2))
     (native-inputs
-     `(("python-setuptools" ,python-setuptools)))
+     `(("python2-setuptools" ,python2-setuptools)))
     (home-page "https://github.com/agronholm/pythonfutures")
     (synopsis
      "Backport of the concurrent.futures package from Python 3.2")
@@ -7308,9 +7298,6 @@ asynchronously executing callables.  This package backports the
 concurrent.futures package from Python 3.2")
     (license bsd-3)))
 
-(define-public python2-futures
-  (package-with-python2 python-futures))
-
 (define-public python-urllib3
   (package
     (name "python-urllib3")
@@ -7541,17 +7528,14 @@ Amazon Web Services (AWS) API.")
 (define-public python-hypothesis
   (package
     (name "python-hypothesis")
-    (version "2.0.0")
+    (version "3.1.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "hypothesis" version))
               (sha256
                (base32
-                "1la6mfpvcn640gs2v35iv8b4sh6xdhp9j5ghay0jd86c9n4fkgxr"))))
+                "0qyqq9akm4vshhn8cngjc1qykcvsn7cz6dlm6njfsgpbraqrmbbw"))))
     (build-system python-build-system)
-    (native-inputs
-     `(;; setuptools required for python-2 variant
-       ("python-setuptools" ,python-setuptools)))
     (propagated-inputs
      `(("python-flake8" ,python-flake8)
        ("python-pytest" ,python-pytest)))
@@ -7561,10 +7545,16 @@ much larger range of examples than you would ever want to write by hand.  It’s
 based on the Haskell library, Quickcheck, and is designed to integrate
 seamlessly into your existing Python unit testing work flow.")
     (home-page "https://github.com/DRMacIver/hypothesis")
-    (license mpl2.0)))
+    (license mpl2.0)
+    (properties `((python2-variant . ,(delay python2-hypothesis))))))
 
 (define-public python2-hypothesis
-  (package-with-python2 python-hypothesis))
+  (let ((hypothesis (package-with-python2
+                     (strip-python2-variant python-hypothesis))))
+    (package (inherit hypothesis)
+      (native-inputs
+       `(("python2-enum34" ,python2-enum34)
+         ("python2-setuptools" ,python2-setuptools))))))
 
 (define-public python-pytest-subtesthack
   (package
@@ -7786,10 +7776,8 @@ file.")
        (sha256
         (base32
          "16dsv9qi0r4qsrsb6dilpq2rx0fnglvh36flzywcdnm2jg43mb5d"))
-       (patches (list (search-patch
-                       "python-paste-remove-website-test.patch")
-                      (search-patch
-                       "python-paste-remove-timing-test.patch")))))
+       (patches (search-patches "python-paste-remove-website-test.patch"
+                                "python-paste-remove-timing-test.patch"))))
     (build-system python-build-system)
     (native-inputs
      `(("python-nose" ,python-nose)))
@@ -8108,8 +8096,10 @@ Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
     (build-system python-build-system)
     (native-inputs
      `(("python-nose" ,python-nose)))
-    (propagated-inputs
+    (inputs
      `(("python-pytz" ,python-pytz)
+       ("python-amqp" ,python-amqp)
+       ("python-anyjson" ,python-anyjson)
        ("python-billiard" ,python-billiard)
        ("python-kombu" ,python-kombu)))
     (home-page "http://celeryproject.org")
@@ -8243,3 +8233,558 @@ 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.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "psycopg2" version))
+       (sha256
+        (base32
+         "0k4hshvrwsh8yagydyxgmd0pjm29lwdxkngcq9fzfzkmpsxrmkva"))))
+    (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 lgpl3+)
+    (properties `((python2-variant . ,(delay python2-psycopg2))))))
+
+(define-public python2-psycopg2
+  (package
+    (inherit (package-with-python2
+              (strip-python2-variant python-psycopg2)))
+    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+
+(define-public python-vobject
+  (package
+    (name "python-vobject")
+    (version "0.9.2")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "vobject" version))
+              (sha256
+               (base32
+                "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb"))))
+    (build-system python-build-system)
+    (inputs
+     `(("python-dateutil-2" ,python-dateutil-2)
+       ("python-pyicu" ,python-pyicu)))
+    (synopsis "Parse and generate vCard and vCalendar files")
+    (description "Vobject is intended to be a full featured Python package for
+parsing and generating vCard and vCalendar files.  Currently, iCalendar files
+are supported and well tested. vCard 3.0 files are supported, and all data
+should be imported, but only a few components are understood in a sophisticated
+way.")
+    (home-page "http://eventable.github.io/vobject/")
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-vobject))))))
+
+(define-public python2-vobject
+  (package
+    (inherit (package-with-python2
+              (strip-python2-variant python-vobject)))
+    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+
+(define-public python-munkres
+  (package
+    (name "python-munkres")
+    (version "1.0.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "munkres" version))
+              (sha256
+               (base32
+                "1i6nf45i0kkzdx6k70giybsqxz4dxsjbrkrfqgjd7znfkf25sjik"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:tests? #f)) ; no test suite
+    (home-page "http://software.clapper.org/munkres/")
+    (synopsis "Implementation of the Munkres algorithm")
+    (description "The Munkres module provides an implementation of the Munkres
+algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
+useful for solving the Assignment Problem.")
+    (license bsd-3)))
+
+(define-public python2-munkres
+  (package-with-python2 python-munkres))
+
+(define-public python-flask
+  (package
+    (name "python-flask")
+    (version "0.10.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "Flask" version))
+              (sha256
+               (base32
+                "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-itsdangerous" ,python-itsdangerous)
+       ("python-jinja2" ,python-jinja2)
+       ("python-werkzeug" ,python-werkzeug)))
+    (home-page "https://github.com/mitsuhiko/flask/")
+    (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
+    (description "Flask is a micro web framework based on the Werkzeug toolkit
+and Jinja2 template engine.  It is called a micro framework because it does not
+presume or force a developer to use a particular tool or library.")
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-flask))))))
+
+(define-public python2-flask
+  (package (inherit (package-with-python2
+                     (strip-python2-variant python-flask)))
+    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+
+(define-public python-cookies
+  (package
+    (name "python-cookies")
+    (version "2.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "cookies" version))
+              (sha256
+               (base32
+                "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
+       #:tests? #f))
+    (native-inputs
+     `(("python-pytest" ,python2-pytest)))
+    (synopsis "HTTP cookie parser and renderer")
+    (description "A RFC 6265-compliant HTTP cookie parser and renderer in
+Python.")
+    (home-page "https://gitlab.com/sashahart/cookies")
+    (license license:expat)
+    (properties `((python2-variant . ,(delay python2-cookies))))))
+
+(define-public python2-cookies
+  (let ((cookies (package-with-python2
+                  (strip-python2-variant python-cookies))))
+    (package (inherit cookies)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs cookies))))))
+
+(define-public python-responses
+  (package
+    (name "python-responses")
+    (version "0.5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "responses" version))
+              (sha256
+               (base32
+                "1spcfxixyk9k7pk82jm6zqkwk031s95lh8q0mz7539jrb7269bcc"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; Test suite is not distributed:
+       ;; https://github.com/getsentry/responses/issues/38
+       #:tests? #f))
+    (native-inputs
+     `(("python-cookies" ,python-cookies)
+       ("python-mock" ,python-mock)))
+    (propagated-inputs
+     `(("python-requests" ,python-requests)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/getsentry/responses")
+    (synopsis "Utility for mocking out the `requests` Python library")
+    (description "A utility library for mocking out the `requests` Python
+library.")
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-responses))))))
+
+(define-public python2-responses
+  (let ((responses (package-with-python2
+                    (strip-python2-variant python-responses))))
+    (package (inherit responses)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs responses))))))
+
+(define-public python-pathlib
+  (package
+    (name "python-pathlib")
+    (version "1.0.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pathlib" version))
+              (sha256
+               (base32
+                "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _ (zero? (system* "python" "./test_pathlib.py")))))))
+    (home-page "https://pathlib.readthedocs.org/")
+    (synopsis "Object-oriented filesystem paths")
+    (description "Pathlib offers a set of classes to handle filesystem paths.
+It offers the following advantages over using string objects:
+
+@enumerate
+@item No more cumbersome use of os and os.path functions.  Everything can
+be done easily through operators, attribute accesses, and method calls.
+@item Embodies the semantics of different path types.  For example,
+comparing Windows paths ignores casing.
+@item Well-defined semantics, eliminating any inconsistencies or
+ambiguities (forward vs. backward slashes, etc.).
+@end enumerate\n")
+    (license license:expat)))
+
+(define-public python2-pathlib
+  (package-with-python2 python-pathlib))
+
+(define-public python-jellyfish
+  (package
+    (name "python-jellyfish")
+    (version "0.5.3")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "jellyfish" version))
+              (sha256
+               (base32
+                "12bxh8cy9xmvyrjz7aw159nd5pyvb645rkvw4r6bvm4xbvs8gd07"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/jamesturk/jellyfish")
+    (synopsis "Approximate and phonetic matching of strings")
+    (description "Jellyfish uses a variety of string comparison and phonetic
+encoding algorithms to do fuzzy string matching.")
+    (license bsd-2)
+    (properties `((python2-variant . ,(delay python2-jellyfish))))))
+
+(define-public python2-jellyfish
+  (let ((jellyfish (package-with-python2
+                     (strip-python2-variant python-jellyfish))))
+    (package (inherit jellyfish)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ("python2-unicodecsv" ,python2-unicodecsv)
+                       ,@(package-native-inputs jellyfish))))))
+
+(define-public python2-unicodecsv
+  (package
+    (name "python2-unicodecsv")
+    (version "0.14.1")
+    (source (origin
+             (method url-fetch)
+             ;; The test suite is not included in the PyPi release.
+             ;; https://github.com/jdunck/python-unicodecsv/issues/19
+             (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
+                                 "archive/" version ".tar.gz"))
+             (file-name (string-append name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
+    (build-system python-build-system)
+    (arguments
+     `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
+       #:python ,python-2))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)
+       ("python2-unittest2" ,python2-unittest2)))
+    (home-page "https://github.com/jdunck/python-unicodecsv")
+    (synopsis "Unicode CSV module for Python 2")
+    (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
+module, adding support for Unicode strings.")
+    (license bsd-2)))
+
+(define-public python-rarfile
+  (package
+    (name "python-rarfile")
+    (version "2.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "rarfile" version))
+              (sha256
+               (base32
+                "0d8n1dlpiz7av8dmbp0vclrwl9cnxizr4f2c9xvj1h5nvn480527"))
+              ;; https://github.com/markokr/rarfile/pull/17/
+              (patches (search-patches "python-rarfile-fix-tests.patch"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           ;; Many tests fail, but the installation proceeds.
+           (lambda _ (zero? (system* "make" "-C" "test" "test")))))))
+    (native-inputs
+     `(("which" ,which))) ; required for tests
+    (propagated-inputs
+     `(("libarchive" ,libarchive)))
+    (home-page "https://github.com/markokr/rarfile")
+    (synopsis "RAR archive reader for Python")
+    (description "This is Python module for RAR archive reading.  The interface
+is made as zipfile like as possible.")
+    (license isc)))
+
+(define-public python2-rarfile
+  (package-with-python2 python-rarfile))
+
+(define-public python-magic
+  (package
+    (name "python-magic")
+    (version "0.4.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/ahupp/python-magic/archive/"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "17bgy92i7sb021f2s4mw1dcvpm6p1mi9jihridwy1pyn8mzvpjgk"))
+       (file-name (string-append name "-" version "-checkout"))))
+    (build-system python-build-system)
+    (arguments
+     ;; The tests are unreliable, so don't run them.  The tests fail
+     ;; under Python3 because they were written for Python2 and
+     ;; contain import statements that do not work in Python3.  One of
+     ;; the tests fails under Python2 because its assertions are
+     ;; overly stringent; it relies on comparing output strings which
+     ;; are brittle and can change depending on the version of
+     ;; libmagic being used and the system on which the test is
+     ;; running.  In my case, under GuixSD 0.10.0, only one test
+     ;; failed, and it seems to have failed only because the version
+     ;; of libmagic that is packaged in Guix outputs a slightly
+     ;; different (but not wrong) string than the one that the test
+     ;; expected.
+     '(#:tests? #f
+       #:phases (modify-phases %standard-phases
+         ;; Replace a specific method call with a hard-coded
+         ;; path to the necessary libmagic.so file in the
+         ;; store.  If we don't do this, then the method call
+         ;; will fail to find the libmagic.so file, which in
+         ;; turn will cause any application using
+         ;; python-magic to fail.
+         (add-before 'build 'hard-code-path-to-libmagic
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((file (assoc-ref inputs "file")))
+               (substitute* "magic.py"
+                 (("ctypes.util.find_library\\('magic'\\)")
+                  (string-append "'" file "/lib/libmagic.so'")))
+           #t))))))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (inputs
+     ;; python-magic needs to be able to find libmagic.so.
+     `(("file" ,file)))
+    (home-page "https://github.com/ahupp/python-magic")
+    (synopsis "File type identification using libmagic")
+    (description
+     "This module uses ctypes to access the libmagic file type
+identification library.  It makes use of the local magic database and
+supports both textual and MIME-type output.  Note that this module and
+the python-file module both provide a \"magic.py\" file; these two
+modules, which are different and were developed separately, both serve
+the same purpose: to provide Python bindings for libmagic.")
+    (license license:expat)))
+
+(define-public python2-magic
+  (package-with-python2 python-magic))
+
+(define-public python2-s3cmd
+  (package
+    (name "python2-s3cmd")
+    (version "1.6.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "mirror://sourceforge/s3tools/"
+                            "s3cmd-" version ".tar.gz"))
+        (sha256
+          (base32
+            "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
+    (build-system python-build-system)
+    (arguments
+     ;; s3cmd is written for python2 only and contains no tests.
+     `(#:python ,python-2
+       #:tests? #f))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))
+    (inputs
+     `(("python2-dateutil" ,python2-dateutil)
+       ;; The python-file package also provides a magic.py module.
+       ;; This is an unfortunate state of affairs; however, s3cmd
+       ;; fails to install if it cannot find specifically the
+       ;; python-magic package.  Thus we include it, instead of using
+       ;; python-file.  Ironically, s3cmd sometimes works better
+       ;; without libmagic bindings at all:
+       ;; https://github.com/s3tools/s3cmd/issues/198
+       ("python2-magic" ,python2-magic)))
+    (home-page "http://s3tools.org/s3cmd")
+    (synopsis "Command line tool for S3-compatible storage services")
+    (description
+     "S3cmd is a command line tool for uploading, retrieving and managing data
+in storage services that are compatible with the Amazon Simple Storage
+Service (S3) protocol, including S3 itself.  It supports rsync-like backup,
+GnuPG encryption, and more.  It also supports management of Amazon's
+CloudFront content delivery network.")
+    (license gpl2+)))
+
+(define-public python-pkgconfig
+  (package
+    (name "python-pkgconfig")
+    (version "1.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "pkgconfig" version))
+        (sha256
+          (base32
+            "1pw0kmvc57sjmaxi6c54fqsnihqj6hvhc9y1vaz36axafzqam7bh"))))
+    (build-system python-build-system)
+    (native-inputs
+      `(("python-nose" ,python-nose)
+        ("python-setuptools" ,python-setuptools)))
+    (inputs
+      `(("pkg-config" ,pkg-config)))
+    (arguments
+      `(;; Tests fail with "ValueError: _type_ 'v' not supported" on Python 3,
+        ;; and on Python 2 they need the dl module deprecated since Python 2.6.
+        #:tests? #f
+        ;; Prevent creation of the egg. This works around
+        ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
+        #:configure-flags '("--single-version-externally-managed" "--root=/")
+        ;; Hard-code the path to pkg-config.
+        #:phases
+        (modify-phases %standard-phases
+          (add-before
+           'build 'patch
+           (lambda _
+             (substitute* "pkgconfig/pkgconfig.py"
+               (("cmd = 'pkg-config")
+                (string-append "cmd = '" (which "pkg-config"))))
+             #t)))))
+    (home-page "http://github.com/matze/pkgconfig")
+    (synopsis "Python interface for pkg-config")
+    (description "This module provides a Python interface to pkg-config.  It
+can be used to find all pkg-config packages, check if a package exists,
+check if a package meets certain version requirements, query CFLAGS and
+LDFLAGS and parse the output to build extensions with setup.py.")
+    (license license:expat)))
+
+(define-public python2-pkgconfig
+  (package-with-python2 python-pkgconfig))
+
+(define-public python-cysignals
+  (package
+    (name "python-cysignals")
+    (version "1.1.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "cysignals" version ".tar.bz2"))
+        (sha256
+          (base32
+            "14cbyd9znlz6cxy1s3g6v6dv5jj45hn27pywkidd9b1zanaysqc6"))))
+    (build-system python-build-system)
+    (native-inputs
+      `(("python-cython" ,python-cython)
+        ("python-setuptools" ,python-setuptools)
+        ("python-sphinx" ,python-sphinx)))
+    (inputs
+      `(("pari-gp" ,pari-gp)))
+    (arguments
+     `(#:modules ((guix build python-build-system)
+                  ((guix build gnu-build-system) #:prefix gnu:)
+                  (guix build utils))
+       ;; FIXME: Tests are executed after installation and currently fail
+       ;; when not installing into standard locations; the author is working
+       ;; on a fix.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'build 'configure
+          (assoc-ref gnu:%standard-phases 'configure)))))
+    (home-page
+      "https://github.com/sagemath/cysignals")
+    (synopsis
+      "Handling of interrupts and signals for Cython")
+    (description
+      "The cysignals package provides mechanisms to handle interrupts (and
+other signals and errors) in Cython code, using two related approaches,
+for mixed Cython/Python code or external C libraries and pure Cython code,
+respectively.")
+    (license lgpl3+)))
+
+(define-public python2-cysignals
+  (package-with-python2 python-cysignals))
+
+(define-public python2-shedskin
+ (package
+  (name "python2-shedskin")
+  (version "0.9.4")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append "https://github.com/shedskin/shedskin/"
+                          "releases/download/v" version
+                          "/shedskin-" version ".tgz"))
+      (sha256
+        (base32
+          "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
+  (build-system python-build-system)
+  (arguments
+   `(#:python ,python-2
+     #:phases (modify-phases %standard-phases
+               (add-after 'unpack 'fix-resulting-include-libs
+                (lambda* (#:key inputs #:allow-other-keys)
+                 (let ((libgc (assoc-ref inputs "libgc"))
+                       (pcre (assoc-ref inputs "pcre")))
+                  (substitute* "shedskin/makefile.py"
+                   (("variable == 'CCFLAGS':[ ]*")
+                    (string-append "variable == 'CCFLAGS':\n"
+                                   "            line += ' -I " pcre "/include"
+                                   " -I " libgc "/include'"))
+                   (("variable == 'LFLAGS':[ ]*")
+                    (string-append "variable == 'LFLAGS':\n"
+                                   "            line += ' -L" pcre "/lib"
+                                   " -L " libgc "/lib'")))
+                  #t))))))
+  (native-inputs `(("python2-setuptools" ,python2-setuptools)))
+  (inputs `(("pcre" ,pcre)
+            ("libgc" ,libgc)))
+  (home-page "https://shedskin.github.io/")
+  (synopsis "Experimental Python-2 to C++ Compiler")
+  (description (string-append "This is an experimental compiler for a subset of
+Python.  It generates C++ code and a Makefile."))
+  (license (list gpl3 bsd-3 license:expat))))
+
+(define-public python2-rope
+  (package
+    (name "python2-rope")
+    (version "0.10.3")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (pypi-uri "rope" version))
+      (sha256
+        (base32
+         "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
+    (arguments
+     ;; Rope is currently python-2 only.
+     ;; https://github.com/python-rope/rope/issues/57
+     `(#:python ,python-2))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python2-unittest2" ,python2-unittest2)
+       ("python2-setuptools" ,python2-setuptools)))
+    (home-page "https://github.com/python-rope/rope")
+    (synopsis "Refactoring library for Python")
+    (description "Rope is a refactoring library for Python.  It facilitates
+the renaming, moving and extracting of attributes, functions, modules, fields
+and parameters in Python 2 source code.  These refactorings can also be applied
+to occurences in strings and comments.")
+    (license gpl2)))