gnu: python-responses: Correct inputs
[jackhill/guix/guix.git] / gnu / packages / python.scm
index ace0ac3..ef8a78f 100644 (file)
@@ -618,11 +618,16 @@ making them easy to handle and incorporate into other protocols.")
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pyyaml" ,python-pyyaml)
+       ;; Not listed in setup.py, but used in ccmlib/node.py for full
+       ;; functionality
+       ("python-psutil" ,python-psutil)
        ("python-six" ,python-six)))
     (home-page "https://github.com/pcmanus/ccm")
-    (synopsis "Cassandra Cluster Manager")
-    (description "A script/library to create, launch and remove an Apache
-Cassandra cluster on localhost.")
+    (synopsis "Cassandra Cluster Manager for Apache Cassandra clusters on
+localhost")
+    (description "Cassandra Cluster Manager is a development tool for testing
+local Cassandra clusters. It creates, launches and removes Cassandra clusters
+on localhost.")
     (license license:asl2.0)))
 
 (define-public python2-ccm
@@ -737,10 +742,10 @@ and verifies that it matches the intended target hostname.")
                  (string-append "['" prefix "/lib" "']")))
               #t))))))
     (propagated-inputs
-     `(("python-numpy" ,python-numpy)))
+     `(("python-six" ,python-six)
+       ("python-numpy" ,python-numpy)))
     (inputs
-     `(("hdf5" ,hdf5)
-       ("python-six" ,python-six)))
+     `(("hdf5" ,hdf5)))
     (native-inputs
      `(("python-cython" ,python-cython)
        ("python-pkgconfig" ,python-pkgconfig)))
@@ -752,11 +757,10 @@ 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 license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-h5py))))))
+    (license license:bsd-3)))
 
 (define-public python2-h5py
-  (package-with-python2 (strip-python2-variant python-h5py)))
+  (package-with-python2 python-h5py))
 
 (define-public python-lockfile
   (package
@@ -821,7 +825,15 @@ have been used.")
                           version ".tar.gz"))
       (sha256
        (base32
-        "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))))
+        "0kc7rbav00ks6iaw14p38y81q12fx0lpkhgf5m97xc04f5r318ig"))
+      (modules '((guix build utils)))
+      (snippet
+       '(begin
+          ;; Remove included binaries which are used to build self-extracting
+          ;; installers for Windows.
+          ;; TODO: Find some way to build them ourself so we can include them.
+          (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
+          #t))))
     (build-system python-build-system)
     ;; FIXME: Tests require pytest, which itself relies on setuptools.
     ;; One could bootstrap with an internal untested setuptools.
@@ -1032,7 +1044,8 @@ datetime module, available in Python 2.3+.")
        ("python-pytz" ,python-pytz)
        ("python-dateutil" ,python-dateutil-2)))
     (native-inputs
-     `(("python-nose" ,python-nose)))
+     `(("python-nose" ,python-nose)
+       ("python-cython" ,python-cython)))
     (home-page "http://pandas.pydata.org")
     (synopsis "Data structures for data analysis, time series, and statistics")
     (description
@@ -1390,6 +1403,7 @@ syntax.")
     (arguments
      ;; With Python 3.x, fails to build with a syntax error.
      `(#:python ,python-2
+       #:use-setuptools? #f                ; still relies on distutils
        #:tests? #f))                       ; no 'python setup.py test' command
     (home-page "http://scons.org/")
     (synopsis "Software construction tool written in Python")
@@ -1608,9 +1622,10 @@ code introspection, and logging.")
            (("def test_remove_dir_prefix\\(self\\):")
             "@pytest.mark.xfail\n    def test_remove_dir_prefix(self):")))))
     (build-system python-build-system)
+    (propagated-inputs
+     `(("python-py" ,python-py)))
     (native-inputs
-     `(("python-py" ,python-py)
-       ("python-nose" ,python-nose)
+     `(("python-nose" ,python-nose)
        ("python-mock" ,python-mock)))
     (home-page "http://pytest.org")
     (synopsis "Python testing library")
@@ -1660,6 +1675,16 @@ and many external plugins.")
          (base32
           "1yl4nbhzfgsxqlsyk4clafgp9x11zvgrkprm9i2p3fgkwx9jxcm8"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+          (lambda _
+            ;; options taken from tox.ini
+            ;; TODO: make "--restructuredtext" tests pass. They currently fail
+            ;; with "Duplicate implicit target name"
+            (zero? (system* "python" "./setup.py" "check"
+                            "--strict" "--metadata")))))))
     (propagated-inputs
      `(("python-coverage" ,python-coverage)
        ("python-pytest" ,python-pytest)))
@@ -1725,8 +1750,7 @@ supports coverage of subprocesses.")
     (native-inputs
      `(("unzip" ,unzip)))
     (propagated-inputs
-     `(("python-py" ,python-py)
-       ("python-pytest" ,python-pytest)))
+     `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/pytest-dev/pytest-mock/")
     (synopsis "Thin-wrapper around the mock package for easier use with py.test")
     (description
@@ -1770,8 +1794,7 @@ same arguments.")
      `(("unzip" ,unzip)
        ("python-setuptools-scm" ,python-setuptools-scm)))
     (propagated-inputs
-     `(("python-apipkg" ,python-apipkg)
-       ("python-execnet" ,python-execnet)
+     `(("python-execnet" ,python-execnet)
        ("python-pytest" ,python-pytest)
        ("python-py" ,python-py)))
     (home-page
@@ -1804,7 +1827,7 @@ result back.")
         (base32
          "0f4w84k8ck82syys7yg9maz93mqzc8p5ymis941x034v44jzq74m"))))
     (build-system python-build-system)
-    (propagated-inputs
+    (native-inputs
      `(("python-pytest" ,python-pytest)))
     (home-page "http://pythonpaste.org/scripttest/")
     (synopsis "Python library to test command-line scripts")
@@ -1860,8 +1883,7 @@ compatibility.")
          "1671jvrvqlmbnc42j7pc5y6vc37q44aiwrq0zic652pxyy2fxvjg"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-testtools" ,python-testtools)
-       ("python-mimeparse" ,python-mimeparse)))
+     `(("python-testtools" ,python-testtools)))
     (home-page "https://launchpad.net/testscenarios")
     (synopsis "Pyunit extension for dependency injection")
     (description
@@ -1912,9 +1934,10 @@ use of resources by test cases.")
          "1nkw9wfbvizmpajbj3in8ns07g7lwkiv8hip14jjlwk3cacls6jv"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-testtools" ,python-testtools)
-       ("python-mimeparse" ,python-mimeparse)
-       ("python-testscenarios" ,python-testscenarios)))
+     `(("python-extras" ,python-extras)
+       ("python-mimeparse" ,python-mimeparse)))
+    (native-inputs
+     `(("python-testscenarios" ,python-testscenarios)))
     (home-page "http://launchpad.net/subunit")
     (synopsis "Python implementation of the subunit protocol")
     (description
@@ -1925,104 +1948,65 @@ protocol.")
 (define-public python2-subunit
   (package-with-python2 python-subunit))
 
-;; Recent versions of python-fixtures need a recent version of python-pbr,
-;; which needs a recent version of python-fixtures. To fix this circular
-;; dependency, we keep old versions of python-fixtures and python-pbr to
-;; bootstrap the whole thing:
-;; - python-fixtures-0.3.16 is used to build python-pbr-0.11
-;; - python-pbr-0.11 is used to build python-fixtures
-;; - python-fixtures is used to build python-pbr
-(define-public python-fixtures-0.3.16
-  (package
-    (name "python-fixtures")
-    (version "0.3.16")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/f/fixtures/fixtures-"
-             version ".tar.gz"))
-       (sha256
-        (base32
-         "0x9r2gwilcig5g54k60bxzg96zabizq1855lrprlb4zckalp9asc"))))
-    (build-system python-build-system)
-    (arguments
-     '(#:tests? #f)) ; no setup.py test command
-    (home-page "https://launchpad.net/python-fixtures")
-    (synopsis "Python test fixture library")
-    (description
-     "Fixtures provides a way to create reusable state, useful when writing
-Python tests.")
-    (license (list license:bsd-3 license:asl2.0)))) ; at user's option
-
-(define-public python2-fixtures-0.3.16
-  (package-with-python2 python-fixtures-0.3.16))
-
-(define-public python-pbr-0.11
-  (package
-    (name "python-pbr")
-    (version "0.11.0")
+;; Recent versions of python-fixtures and python-testrepository need
+;; python-pbr for packaging, which itself needs these two packages for
+;; testing.
+;; To fix this circular dependency, we use a build of python-pbr, based on the
+;; same source, just without any test dependencies and with tests disabled.
+;; python-pbr-minmal is then used to package python-fixtures and
+;; python-testrepository.
+;; Strictly speaking we currently could remove the test-requirements from the
+;; normal python-pbr package (and save this package) since test are disabled
+;; there anyway. But this may change in future.
+(define python-pbr-minimal
+  (package
+    (name "python-pbr-minimal")
+    (version "1.8.1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append
-             "https://pypi.python.org/packages/source/p/pbr/pbr-"
-             version ".tar.gz"))
+       (uri (pypi-uri "pbr" version))
        (sha256
         (base32
-         "0v9gb7gyqf7q9s99l0nnjj9ww9b0jvyqlwm4d56pcyinxydddw6p"))))
+         "0jcny36cf3s8ar5r4a575npz080hndnrfs4np1fqhv0ym4k7c4p2"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f)) ;; Most tests seem to use the Internet.
-    (propagated-inputs
-      `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)))
-    (home-page "https://launchpad.net/pbr")
-    (synopsis "Change the default behavior of Python’s setuptools")
+     `(#:tests? #f))
+    (home-page "http://docs.openstack.org/developer/pbr/")
+    (synopsis "Minimal build of python-pbr used for bootstrapping")
     (description
-      "Python Build Reasonableness (PBR) is a library that injects some useful
-and sensible default behaviors into your setuptools run.")
+     "Used only for bootstrapping python2-pbr, you should not need this.")
     (license license:asl2.0)))
 
-(define-public python2-pbr-0.11
-  (package-with-python2 python-pbr-0.11))
+(define python2-pbr-minimal
+  (package-with-python2 python-pbr-minimal))
 
 (define-public python-pbr
   (package
+    (inherit python-pbr-minimal)
     (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
+      `(("git" ,git))) ;; pbr actually uses the "git" binary.
+    (native-inputs
       `(("python-fixtures" ,python-fixtures)
-        ("python-mimeparse" ,python-mimeparse)
+        ;; discover, coverage, hacking, subunit
         ("python-mock" ,python-mock)
-         ("python-six" ,python-six)
+        ("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")
+    (synopsis "Enhance 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 license:asl2.0)))
+and sensible default behaviors into your setuptools run.  It will set
+versions, process requirements files and generate AUTHORS and ChangeLog file
+from git information.
+")))
 
 (define-public python2-pbr
   (package-with-python2 python-pbr))
@@ -2040,13 +2024,10 @@ and sensible default behaviors into your setuptools run.")
          "0djxvdwm8s60dbfn7bhf40x6g818p3b3mlwijm1c3bqg7msn271y"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-six" ,python-six)
-       ("python-pbr-0.11" ,python-pbr-0.11)))
+     `(("python-six" ,python-six)))
     (native-inputs
-     `(;; Tests
+     `(("python-pbr-minimal" ,python-pbr-minimal)
        ("python-testtools" ,python-testtools)))
-    (arguments
-     '(#:tests? #f)) ; no setup.py test command
     (home-page "https://launchpad.net/python-fixtures")
     (synopsis "Python test fixture library")
     (description
@@ -2072,10 +2053,11 @@ Python tests.")
          "1ssqb07c277010i6gzzkbdd46gd9mrj0bi0i8vn560n2k2y4j93m"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-fixtures-0.3.16" ,python-fixtures-0.3.16)
+     `(("python-fixtures" ,python-fixtures)
+       ("python-subunit" ,python-subunit)
        ("python-testtools" ,python-testtools)))
     (native-inputs
-     `(("python-subunit" ,python-subunit)
+     `(("python-pbr-minimal" ,python-pbr-minimal) ;; same as for building fixture
        ("python-mimeparse" ,python-mimeparse)))
     (home-page "https://launchpad.net/testrepository")
     (synopsis "Database for Python test results")
@@ -2123,7 +2105,7 @@ executed.")
          (base32
           "0k3np9ymh06yv1ib96sb6wfsxjkqhmik8qfsn119vnhga9ywc52a"))))
     (build-system python-build-system)
-    (native-inputs
+    (propagated-inputs
      `(("python-coverage" ,python-coverage)))
     (home-page "https://github.com/schlamar/cov-core")
     (synopsis "plugin core for use by pytest-cov, nose-cov and nose2-cov")
@@ -2458,9 +2440,9 @@ somewhat intelligeble.")
          "1556v2jppd8mjkkj66pxb5rcazm35jq81r233mdl8hfmz9n3icp1"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-pytest-runner" ,python-pytest-runner)))
-    (arguments
-     '(#:tests? #f)) ; test suite doesn't work
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-runner" ,python-pytest-runner)))
     (home-page "http://github.com/progrium/pyjwt")
     (synopsis "JSON Web Token implementation in Python")
     (description
@@ -2482,13 +2464,10 @@ somewhat intelligeble.")
                 "1bfrj70vdjxjw74khbyh6f0dksv7p5rh2346jnlrffyacd3gwjzg"))))
     (build-system python-build-system)
     (native-inputs
-     `(("python-coverage" ,python-coverage)
-       ("python-nose" ,python-nose)
-       ("python-mock" ,python-mock)))
-    (propagated-inputs
-     `(("python-blinker" ,python-blinker)
+     `(("python-nose" ,python-nose)
        ("python-cryptography" ,python-cryptography)
-       ("python-pyjwt" ,python-pyjwt)))
+       ("python-pyjwt" ,python-pyjwt)
+       ("python-blinker" ,python-blinker)))
     (home-page "https://github.com/idan/oauthlib")
     (synopsis "OAuth implementation for Python")
     (description
@@ -2502,6 +2481,7 @@ OAuth request-signing logic.")
     (package
       (inherit base)
       (native-inputs `(("python2-unittest2" ,python2-unittest2)
+                       ("python2-mock" ,python2-mock)
                        ,@(package-native-inputs base))))))
 
 (define-public python-itsdangerous
@@ -2669,7 +2649,15 @@ logic-free templating system Mustache.")
               (uri (pypi-uri "joblib" version))
               (sha256
                (base32
-                "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))))
+                "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove pre-compiled .pyc files from source.
+           (for-each delete-file-recursively
+                     (find-files "." "__pycache__" #:directories? #t))
+           (for-each delete-file (find-files "." "\\.pyc$"))
+           #t))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -2690,6 +2678,7 @@ logic-free templating system Mustache.")
                (("def test_parallel_with_interactively_defined_functions" line)
                 (string-append "@SkipTest\n" line)))
              #t)))))
+    ;; Provide nose to enable tests command
     (native-inputs
      `(("python-nose"       ,python-nose)
        ("python-sphinx"     ,python-sphinx)
@@ -2799,9 +2788,6 @@ sources.")
         (base32
          "19nw3rn7awplcdrz63kg1njqwkbymfg9lwn7l2grhdyhyr2gaa8g"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)))
     (home-page "https://github.com/snide/sphinx_rtd_theme/")
     (synopsis "ReadTheDocs.org theme for Sphinx")
     (description "A theme for Sphinx used by ReadTheDocs.org.")
@@ -2810,6 +2796,36 @@ sources.")
 (define-public python2-sphinx-rtd-theme
   (package-with-python2 python-sphinx-rtd-theme))
 
+(define-public python-rst.linker
+  (package
+    (name "python-rst.linker")
+    (version "1.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "rst.linker" version))
+       (sha256
+        (base32
+         "0bh4lnj2p1nh0wf5pgxgfbrp27xhb1rinahkb5j7s3qprq6qn0sr"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-dateutil" ,python-dateutil-2)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    ;; Test would require path.py, which would introduce a cyclic dependence.
+    (arguments `(#:tests? #f))
+    ;; Note: As of version 1.7 the documentation is not worth building.
+    (home-page "https://github.com/jaraco/rst.linker")
+    (synopsis "Sphinx plugin to add links and timestamps")
+    (description "rst.linker allows to automatically replace text by a
+reStructuredText external reference or timestamps.  It's primary purpose is to
+augment the changelog, but it can be used for other documents, too.")
+    (license license:expat)))
+
+(define-public python2-rst.linker
+  (package-with-python2 python-rst.linker))
+
 (define-public python-feedgenerator
   (package
     (name "python-feedgenerator")
@@ -2820,7 +2836,15 @@ sources.")
        (uri (pypi-uri "feedgenerator" version))
        (sha256
         (base32
-         "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))))
+         "0mkimp1fpdan4p3882vzcws4l594k71ich4g0wq97jbra7p602n0"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove pre-compiled .pyc files from source.
+           (for-each delete-file-recursively
+                     (find-files "." "__pycache__" #:directories? #t))
+           (for-each delete-file (find-files "." "\\.pyc$"))
+           #t))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pytz" ,python-pytz)
@@ -2848,9 +2872,6 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
         (base32
          "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
     (build-system python-build-system)
-    ;; No "test" command supplied to setuptools, so unless there's another way
-    ;; to run tests, we're skipping them!
-    (arguments '(#:tests? #f))
     (home-page "http://pythonhosted.org/blinker/")
     (synopsis "Fast, simple object-to-object and broadcast signaling")
     (description
@@ -2939,8 +2960,9 @@ and is very extensible.")
              (system* "nosetests" "-v" "sklearn")))
          (alist-delete 'check %standard-phases)))))
     (inputs
-     `(("openblas" ,openblas)
-       ("python-nose" ,python-nose)))
+     `(("openblas" ,openblas)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
     (propagated-inputs
      `(("python-numpy" ,python-numpy)
        ("python-scipy" ,python-scipy)))
@@ -2968,32 +2990,24 @@ mining and data analysis.")
        (sha256
         (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
     (build-system python-build-system)
+    ;; See DEPENDS.txt for the list of build and run time requiremnts
     (propagated-inputs
      `(("python-matplotlib" ,python-matplotlib)
        ("python-networkx" ,python-networkx)
-       ("python-numpy" ,python-numpy)
        ("python-scipy" ,python-scipy)
-       ("python-six" ,python-six)
        ("python-pillow" ,python-pillow)))
     (native-inputs
-     `(("python-cython" ,python-cython)))
+     `(("python-numpy" ,python-numpy)
+       ("python-cython" ,python-cython)
+       ("python-six" ,python-six)))
     (home-page "http://scikit-image.org/")
     (synopsis "Image processing in Python")
     (description
      "Scikit-image is a collection of algorithms for image processing.")
-    (license license:bsd-3)
-    (properties `((python2-variant . ,(delay python2-scikit-image))))))
+    (license license:bsd-3)))
 
 (define-public python2-scikit-image
-  (let ((scikit-image (package-with-python2
-                        (strip-python2-variant python-scikit-image))))
-    (package (inherit scikit-image)
-      (native-inputs
-       `(("python2-mock" ,python2-mock)
-         ,@(package-native-inputs scikit-image)))
-      (propagated-inputs
-       `(("python2-pytz" ,python2-pytz)
-         ,@(package-propagated-inputs scikit-image))))))
+  (package-with-python2 python-scikit-image))
 
 (define-public python-redis
   (package
@@ -3010,8 +3024,9 @@ mining and data analysis.")
     (build-system python-build-system)
     ;; Tests require a running Redis server
     (arguments '(#:tests? #f))
-    (native-inputs
-     `(("python-pytest" ,python-pytest)))
+    ;; As long as we are not running test, we do not need this input :-)
+    ;;(native-inputs
+    ;; `(("python-pytest" ,python-pytest)))
     (home-page "https://github.com/andymccurdy/redis-py")
     (synopsis "Redis Python client")
     (description
@@ -3126,16 +3141,16 @@ between language specification and implementation aspects.")
          "1bjjhvncraka5s6i4lg644jrxij6bvycxy7an20gcz3a0m11iygp"))))
     (build-system python-build-system)
     (inputs
-     `(("python-nose" ,python-nose)
-       ("openblas" ,openblas)
+     `(("openblas" ,openblas)
        ("lapack" ,lapack)))
     (native-inputs
-     `(("gfortran" ,gfortran)))
+     `(("python-nose" ,python-nose)
+       ("gfortran" ,gfortran)))
     (arguments
      `(#:phases
-       (alist-cons-before
-        'build 'set-environment-variables
-        (lambda* (#:key inputs #:allow-other-keys)
+       (modify-phases %standard-phases
+        (add-before 'build 'set-environment-variables
+         (lambda* (#:key inputs #:allow-other-keys)
           (call-with-output-file "site.cfg"
             (lambda (port)
               (format port
@@ -3144,7 +3159,8 @@ libraries = openblas
 library_dirs = ~a/lib
 include_dirs = ~a/include
 
-[lapack]
+# backslash-n to make emacs happy
+\n[lapack]
 lapack_libs = lapack
 library_dirs = ~a/lib
 include_dirs = ~a/include
@@ -3157,18 +3173,17 @@ include_dirs = ~a/include
           (substitute* "numpy/distutils/system_info.py"
             (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
              "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
-          #t)
+          #t))
         ;; Tests can only be run after the library has been installed and not
         ;; within the source directory.
-        (alist-cons-after
-         'install 'check
-         (lambda _
+        (delete 'check)
+        (add-after 'install 'check
+         (lambda* (#:key outputs inputs #:allow-other-keys)
+           ;; Make installed package available for running the tests
+           (add-installed-pythonpath inputs outputs)
            (with-directory-excursion "/tmp"
              (zero? (system* "python" "-c"
-                             "import numpy; numpy.test(verbose=2)"))))
-         (alist-delete
-          'check
-          %standard-phases)))))
+                             "import numpy; numpy.test(verbose=2)"))))))))
     (home-page "http://www.numpy.org/")
     (synopsis "Fundamental package for scientific computing with Python")
     (description "NumPy is the fundamental package for scientific computing
@@ -3201,10 +3216,10 @@ capabilities.")
        ("python2-matplotlib" ,python2-matplotlib)
        ("python2-pandas" ,python2-pandas)
        ("python2-scikit-learn" ,python2-scikit-learn)
-       ("python2-cython" ,python2-cython)
        ("python2-pysnptools" ,python2-pysnptools)))
     (native-inputs
      `(("unzip" ,unzip)
+       ("python2-cython" ,python2-cython)
        ("python2-mock" ,python2-mock)))
     (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/fastlmm/")
     (synopsis "Perform genome-wide association studies on large data sets")
@@ -3219,14 +3234,15 @@ association studies (GWAS) on extremely large data sets.")
     (name "python-numpy")
     (outputs '("out" "doc"))
     (inputs
-     `(("which" ,which)
-       ("python-matplotlib" ,python-matplotlib)
-       ("python-sphinx" ,python-sphinx)
+     `(("which" ,which)))
+    (propagated-inputs
+     `(("python-matplotlib" ,python-matplotlib)
        ("python-pyparsing" ,python-pyparsing)
-       ("python-numpydoc" ,python-numpydoc)
        ,@(package-inputs python-numpy-bootstrap)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
+       ("python-sphinx" ,python-sphinx)
+       ("python-numpydoc" ,python-numpydoc)
        ("texlive" ,texlive)
        ("texinfo" ,texinfo)
        ("perl" ,perl)
@@ -3237,7 +3253,10 @@ association studies (GWAS) on extremely large data sets.")
            ((#:phases phases)
             `(alist-cons-after
               'install 'install-doc
-              (lambda* (#:key outputs #:allow-other-keys)
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                ;; Make installed package available for building the
+                ;; documentation
+                (add-installed-pythonpath inputs outputs)
                 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
                        (doc (string-append
                              data "/doc/" ,name "-"
@@ -3344,10 +3363,10 @@ that client code uses to construct the grammar directly in Python code.")
            (substitute* "numpydoc/tests/test_plot_directive.py"
              (("3") "2"))))))
     (build-system python-build-system)
-    (inputs
-     `(("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)
-       ("python-nose" ,python-nose)))
+    (native-inputs
+     `(("python-sphinx" ,python-sphinx)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
     (home-page "https://pypi.python.org/pypi/numpydoc")
     (synopsis
      "Numpy's Sphinx extensions")
@@ -3408,6 +3427,11 @@ transcendental functions).")
        ("python-pygobject" ,python-pygobject)
        ("gobject-introspection" ,gobject-introspection)
        ("python-tkinter" ,python "tk")
+       ("python-dateutil" ,python-dateutil-2)
+       ("python-numpy" ,python-numpy-bootstrap)
+       ("python-pillow" ,python-pillow)
+       ("python-pytz" ,python-pytz)
+       ("python-six" ,python-six)
        ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
        ;; from 'gtk+') provides the required 'typelib' files used by
        ;; 'gobject-introspection'. The location of these files is set with the
@@ -3424,20 +3448,11 @@ transcendental functions).")
        ("python-pycairo" ,python-pycairo)
        ("python-cairocffi" ,python-cairocffi)))
     (inputs
-     `(("python-dateutil" ,python-dateutil-2)
-       ("python-six" ,python-six)
-       ("python-pytz" ,python-pytz)
-       ("python-numpy" ,python-numpy-bootstrap)
-       ("python-sphinx" ,python-sphinx)
-       ("python-numpydoc" ,python-numpydoc)
-       ("python-nose" ,python-nose)
-       ("python-mock" ,python-mock)
-       ("libpng" ,libpng)
+     `(("libpng" ,libpng)
        ("imagemagick" ,imagemagick)
        ("freetype" ,freetype)
        ("cairo" ,cairo)
        ("glib" ,glib)
-       ("python-pillow" ,python-pillow)
        ;; FIXME: Add backends when available.
        ;("python-wxpython" ,python-wxpython)
        ;("python-pyqt" ,python-pyqt)
@@ -3445,6 +3460,10 @@ transcendental functions).")
        ("tk" ,tk)))
     (native-inputs
      `(("pkg-config" ,pkg-config)
+       ("python-sphinx" ,python-sphinx)
+       ("python-numpydoc" ,python-numpydoc)
+       ("python-nose" ,python-nose)
+       ("python-mock" ,python-mock)
        ("texlive" ,texlive)
        ("texinfo" ,texinfo)))
     (arguments
@@ -3469,11 +3488,14 @@ backend = TkAgg~%"
                         (assoc-ref inputs "tk"))))))
         (alist-cons-after
          'install 'install-doc
-         (lambda* (#:key outputs #:allow-other-keys)
+         (lambda* (#:key inputs outputs #:allow-other-keys)
            (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
                   (doc (string-append data "/doc/" ,name "-" ,version))
                   (info (string-append data "/info"))
                   (html (string-append doc "/html")))
+             ;; Make installed package available for building the
+             ;; documentation
+             (add-installed-pythonpath inputs outputs)
              (with-directory-excursion "doc"
                ;; Produce pdf in 'A4' format.
                (substitute* (find-files "." "conf\\.py")
@@ -3543,12 +3565,9 @@ toolkits.")
     (propagated-inputs
      `(("python2-numpy" ,python2-numpy)
        ("python2-scipy" ,python2-scipy)
-       ("python2-pytz" ,python2-pytz)
-       ("python2-cython" ,python2-cython)))
-    (inputs
-     `(("python2-dateutil-2" ,python2-dateutil-2)
-       ("python2-pandas" ,python2-pandas)
-       ("python2-six" ,python2-six)))
+       ("python2-pandas" ,python2-pandas)))
+    (native-inputs
+     `(("python2-cython" ,python2-cython)))
     (native-inputs
      `(("unzip" ,unzip)))
     (home-page "http://research.microsoft.com/en-us/um/redmond/projects/mscompbio/")
@@ -3572,9 +3591,10 @@ operators such as union, intersection, and difference.")
         (base32
          "0nhan2qvrw7b7gg5zddwa22kybdv3x1g26vkd7q8lvnkgzrs4dga"))))
     (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)))
     (inputs
-     `(("python-six" ,python-six)
-       ("readline" ,readline)
+     `(("readline" ,readline)
        ("icu4c" ,icu4c)
        ("pcre" ,pcre)
        ("r" ,r)))
@@ -3636,7 +3656,9 @@ functions.")
 libraries = openblas
 library_dirs = ~a/lib
 include_dirs = ~a/include
-[atlas]
+
+# backslash-n to make emacs happy
+\n[atlas]
 library_dirs = ~a/lib
 atlas_libs = openblas
 "
@@ -3646,11 +3668,14 @@ atlas_libs = openblas
           #t)
         (alist-cons-after
          'install 'install-doc
-         (lambda* (#:key outputs #:allow-other-keys)
+         (lambda* (#:key inputs outputs #:allow-other-keys)
            (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
                   (doc (string-append data "/doc/" ,name "-" ,version))
                   (html (string-append doc "/html"))
                   (pyver ,(string-append "PYVER=")))
+             ;; Make installed package available for building the
+             ;; documentation
+             (add-installed-pythonpath inputs outputs)
              (with-directory-excursion "doc"
                ;; Fix generation of images for mathematical expressions.
                (substitute* (find-files "source" "conf\\.py")
@@ -4011,14 +4036,16 @@ services for your Python modules and applications.")
        ("openjpeg" ,openjpeg)
        ("libtiff"  ,libtiff)
        ("libwebp"  ,libwebp)))
-    ;; Note: setuptools used at runtime for pkg_resources
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (add-after
                    'install 'check-installed
-                   (lambda _
+                   (lambda* (#:key outputs inputs #:allow-other-keys)
                      (begin
                        (setenv "HOME" (getcwd))
+                       ;; Make installed package available for running the
+                       ;; tests
+                       (add-installed-pythonpath inputs outputs)
                        (and (zero? (system* "python" "selftest.py"
                                             "--installed"))
                             (zero? (system* "python" "test-installed.py"))))))
@@ -4142,10 +4169,10 @@ a front-end for C compilers or analysis tools.")
         "0655hzxv57h1a9ja9kwp0ichbkhf3djw32k33d66xp0q37dq2y81"))))
     (build-system python-build-system)
     (inputs
-     `(("libxcb" ,libxcb)
-       ("python-six" ,python-six)))
+     `(("libxcb" ,libxcb)))
     (propagated-inputs
-     `(("python-cffi" ,python-cffi))) ; used at run time
+     `(("python-cffi" ,python-cffi) ; used at run time
+       ("python-six" ,python-six)))
     (arguments
      `(#:phases
        (alist-cons-after
@@ -4370,13 +4397,33 @@ them as the version argument or in a SCM managed file.")
                            "path.py/path.py-" version ".tar.gz"))
        (sha256
         (base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
+    (outputs '("out" "doc"))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-appdirs" ,python-appdirs)))
     (native-inputs
      `(("python-setuptools-scm" ,python-setuptools-scm)
+       ("python-sphinx" ,python-sphinx)
+       ("python-rst.linker" ,python-rst.linker)
        ("python-pytest" ,python-pytest)
        ("python-pytest-runner" ,python-pytest-runner)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-doc
+           (lambda _
+             (setenv "LANG" "en_US.UTF-8")
+             (zero? (system* "python" "setup.py" "build_sphinx"))))
+         (add-after 'install 'install-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
+                    (doc (string-append data "/doc/" ,name "-" ,version))
+                    (html (string-append doc "/html")))
+               (mkdir-p html)
+               (for-each (lambda (file)
+                           (copy-file file (string-append doc "/" file)))
+                         '("README.rst" "CHANGES.rst"))
+               (copy-recursively "build/sphinx/html" html)))))))
     (home-page "http://github.com/jaraco/path.py")
     (synopsis "Python module wrapper for built-in os.path")
     (description
@@ -4678,6 +4725,8 @@ tools for mocking system commands and recording calls to those.")
                    (info (string-append data "/info"))
                    (examples (string-append doc "/examples")))
               (setenv "LANG" "en_US.utf8")
+              ;; Make installed package available for running the tests
+              (add-installed-pythonpath inputs outputs)
               (with-directory-excursion "docs"
                 ;; FIXME: pdf fails to build
                 ;;(system* "make" "pdf" "PAPER=a4")
@@ -4697,9 +4746,11 @@ tools for mocking system commands and recording calls to those.")
          (delete 'check)
          (add-after
           'install 'check
-          (lambda* (#:key outputs tests? #:allow-other-keys)
+          (lambda* (#:key inputs outputs tests? #:allow-other-keys)
             (if tests?
                 (with-directory-excursion "/tmp"
+                  ;; Make installed package available for running the tests
+                  (add-installed-pythonpath inputs outputs)
                   (setenv "HOME" "/tmp/") ;; required by a test
                   (zero? (system* (string-append (assoc-ref outputs "out")
                                                  "/bin/iptest"))))
@@ -5295,8 +5346,8 @@ It is written entirely in Python.")
         (base32
          "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
     (build-system python-build-system)
-    (inputs
-     `(("python-six" ,python-six)))
+    (native-inputs
+     `(("python-six" ,python-six))) ; required for conversion, not at run-time
     (home-page
      "http://docs.python.org/3/library/functools.html#functools.singledispatch")
     (synopsis "Backport of singledispatch feature from Python 3.4")
@@ -5487,7 +5538,7 @@ PEP 8.")
           (base32
             "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
       `(("python-pytest" ,python-pytest)
         ("python-pytest-runner" ,python-pytest-runner)))
     (home-page "https://github.com/flintwork/mccabe")
@@ -5564,11 +5615,12 @@ complexity of Python source code.")
           (base32
             "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"))))
     (build-system python-build-system)
-    (inputs
+    (propagated-inputs
       `(("python-pep8" ,python-pep8)
         ("python-pyflakes" ,python-pyflakes)
-        ("python-mccabe" ,python-mccabe)
-        ("python-mock" ,python-mock)
+        ("python-mccabe" ,python-mccabe)))
+    (native-inputs
+      `(("python-mock" ,python-mock) ; TODO: only required for < 3.3
         ("python-nose" ,python-nose)))
     (home-page "https://gitlab.com/pycqa/flake8")
     (synopsis
@@ -5584,11 +5636,12 @@ complexity of Python source code.")
 ;; necessary once python-hacking > 0.10.2 is released.
 (define-public python-flake8-2.2.4
   (package (inherit python-flake8)
-    (inputs
+    (propagated-inputs
       `(("python-pep8" ,python-pep8-1.5.7)
         ("python-pyflakes" ,python-pyflakes-0.8.1)
-        ("python-mccabe" ,python-mccabe-0.2.1)
-        ("python-mock" ,python-mock)
+        ("python-mccabe" ,python-mccabe-0.2.1)))
+    (native-inputs
+      `(("python-mock" ,python-mock)
         ("python-nose" ,python-nose)))
     (version "2.2.4")
     (source
@@ -5617,7 +5670,7 @@ complexity of Python source code.")
         (base32
          "17zqjp9m4d1w3jf2rbbq5xshcw24q1vlcv24gkgfqqyyymajxahx"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
      `(("python-nose" ,python-nose)
        ("python-cython" ,python-cython)))
     (home-page "https://github.com/lepture/mistune")
@@ -5676,7 +5729,7 @@ markdown_py is also provided to convert Markdown files to HTML.")
         (base32
          "0nggns5kikn32yyda2zrj1xdmh49pi3v0drggcdwljbv36r8zdyw"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
      `(("python-nose" ,python-nose)))
     (arguments
      `(#:phases
@@ -5745,12 +5798,23 @@ term.js Javascript terminal emulator library.")
                (base32
                 "08ay3x4ijarwhl60gqx2i9jzq6pxs20p4snc2d1q5jagh4rn39lb"))))
     (build-system python-build-system)
-    (arguments '(#:test-target "check"))
+    (arguments
+     '(#:test-target "check"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-setuppy
+           ;; Remove the undocumented "extra_path" argument, which adds an
+           ;; intervening directories between site-packages and the package
+           ;; directory.
+           (lambda _
+             (substitute* "setup.py"
+               (("^[ \t]*extra_path *= *'FontTools',") ""))
+             #t)))))
     (home-page "http://github.com/behdad/fonttools")
     (synopsis "Tools to manipulate font files")
     (description
      "FontTools/TTX is a library to manipulate font files from Python.  It
-supports reading and writinfg of TrueType/OpenType fonts, reading and writing
+supports reading and writing of TrueType/OpenType fonts, reading and writing
 of AFM files, reading (and partially writing) of PS Type 1 fonts.  The package
 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
 from an XML-based format.")
@@ -5990,7 +6054,7 @@ fractional seconds) of a clock which never goes backwards.")
         (base32
          "02bhhzijfhv8hmi1i54d4b0v43liwhnywhflvxsv4x3zax9s3afq"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
       `(("python-nose" ,python-nose)))
     (home-page "http://webob.org/")
     (synopsis "WSGI request and response object")
@@ -6969,7 +7033,7 @@ dispatching systems can be built.")
         (base32
          "0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
     (build-system python-build-system)
-    (propagated-inputs
+    (native-inputs
      `(("python-zope-event" ,python-zope-event)))
     (home-page "https://github.com/zopefoundation/zope.interface")
     (synopsis "Python implementation of the \"design by contract\"
@@ -7057,6 +7121,7 @@ forms, HTTP servers, regular expressions, and more.")
     (build-system python-build-system)
     (native-inputs
      `(("python-six" ,python-six)
+       ;("python-zope-interface" ,python-zope-interface)
        ("python-zope-exceptions" ,python-zope-exceptions)
        ("python-zope-testing" ,python-zope-testing)
        ("unzip" ,unzip)))
@@ -7118,7 +7183,9 @@ internationalized messages within program source text.")
      `(("python-zope-event" ,python-zope-event)
        ("python-zope-interface" ,python-zope-interface)))
     (native-inputs
-     `(("python-zope-testing" ,python-zope-testing)))
+     `(("python-zope-testing" ,python-zope-testing)
+       ("python-coverage" ,python-coverage)
+       ("python-nose" ,python-nose)))
     (home-page "http://pypi.python.org/pypi/zope.schema")
     (synopsis "Zope data schemas")
     (description "Zope.scheme provides extensions to zope.interface for
@@ -7193,7 +7260,7 @@ brokering, etc.) for which the proxy is responsible.")
         (base32
          "1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
     (build-system python-build-system)
-    (native-inputs
+    (propagated-inputs
      `(("python-zope-proxy" ,python-zope-proxy)
        ("python-zope-schema" ,python-zope-schema)))
     (home-page "http://pypi.python.org/pypi/zope.location/")
@@ -7220,10 +7287,12 @@ Zope3, which are are special objects that have a structural location.")
     (build-system python-build-system)
     (propagated-inputs
      `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
-       ("python-zope-component" ,python-zope-component)
-       ("python-zope-location" ,python-zope-location)
        ("python-zope-proxy" ,python-zope-proxy)
-       ("python-zope-schema" ,python-zope-schema)
+       ("python-zope-schema" ,python-zope-schema)))
+     (native-inputs
+     `(("python-zope-component" ,python-zope-component)
+       ("python-zope-configuration" ,python-zope-configuration)
+       ("python-zope-location" ,python-zope-location)
        ("python-zope-testrunner" ,python-zope-testrunner)
        ("python-zope-testing" ,python-zope-testing)))
     (home-page "http://pypi.python.org/pypi/zope.security")
@@ -7388,7 +7457,7 @@ addon modules.")
               ;; required to parse the keyword 'install_requires' in setup.py.
               (patches (search-patches "python-configobj-setuptools.patch"))))
     (build-system python-build-system)
-    (native-inputs
+    (propagated-inputs
      `(("python-six" ,python-six)))
     (synopsis "Config file reading, writing and validation")
     (description "ConfigObj is a simple but powerful config file reader and
@@ -7527,8 +7596,8 @@ tables.")
         (base32
          "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
     (build-system python-build-system)
-    (native-inputs
-     `(("python-six" ,python-six))) ; for tests
+    (propagated-inputs
+     `(("python-six" ,python-six)))
     (home-page "https://github.com/liris/websocket-client")
     (synopsis "WebSocket client for Python")
     (description "The Websocket-client module provides the low level APIs for
@@ -7636,7 +7705,7 @@ applications.")
               (base32
                "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
     (build-system python-build-system)
-    (inputs
+    (native-inputs
      `(("python-pytest" ,python-pytest)))
     (synopsis "Namespace control and lazy-import mechanism")
     (description "With apipkg you can control the exported namespace of a Python
@@ -7754,13 +7823,13 @@ framework which enables you to test server connections locally.")
               (base32
                "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
     (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)))
     (native-inputs
      `(("python-pytest" ,python-pytest)
-       ("python-six" ,python-six)
+       ("python-httplib2" ,python-httplib2)
+       ("python-requests" ,python-requests)
        ("python-urllib3" ,python-urllib3)))
-    (propagated-inputs
-     `(("python-httplib2" ,python-httplib2)
-       ("python-requests" ,python-requests)))
     (synopsis "Puts a WSGI application in place of a real URI for testing")
     (description "Wsgi_intercept installs a WSGI application in place of a real
 URI for testing.  Testing a WSGI application normally involves starting a
@@ -8077,7 +8146,7 @@ concurrent.futures package from Python 3.2")
        ("python-mock" ,python-mock)
        ("python-tornado" ,python-tornado)))
     (propagated-inputs
-     `(;; packages for https security
+     `(;; extra packages for https security
        ("python-certifi" ,python-certifi)
        ("python-ndg-httpsclient" ,python-ndg-httpsclient)
        ("python-pyasn1" ,python-pyasn1)
@@ -8173,14 +8242,16 @@ Pytest but stripped of Pytest specific details.")
        "1vj73ar4rimq3fwy5r2z3jv4g9qbh8rmpmncsc00g0k310acqzxz"))))
    (build-system python-build-system)
    (arguments
-    ;; FIXME: Tests require a newer version of pytest, but upgrading our
-    ;; pytest breaks other packages.
+    ;; FIXME: Tests require pytest-timeout, which itself requires
+    ;; pytest>=2.8.0 for installation.
     '(#:tests? #f))
-   (inputs
-    `(("python-pluggy" ,python-pluggy)
+   (propagated-inputs
+    `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
       ("python-py" ,python-py)
-      ("python-virtualenv" ,python-virtualenv)
-      ("python-pytest" ,python-pytest)))
+      ("python-virtualenv" ,python-virtualenv)))
+   (native-inputs
+    `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
+      ("python-pytest" ,python-pytest)))  ; >= 2.3.5
    (home-page "http://tox.testrun.org/")
    (synopsis "Virtualenv-based automation of test activities")
    (description "Tox is a generic virtualenv management and test command line
@@ -8227,14 +8298,16 @@ document.")
       (base32
        "1zxczlwqy9bl27d9bc5x99mb5mcsxm350240lp5nx7014xb311lj"))))
    (build-system python-build-system)
-   (inputs
+   (propagated-inputs
     `(("python-dateutil" ,python-dateutil-2)
       ("python-docutils" ,python-docutils)
-      ("python-mock" ,python-mock)
+      ("python-jmespath" ,python-jmespath)))
+   (inputs
+    `(("python-mock" ,python-mock)
       ("python-nose" ,python-nose)
+      ("behave" ,behave)
       ("python-tox" ,python-tox)
-      ("python-wheel" ,python-wheel)
-      ("python-jmespath" ,python-jmespath)))
+      ("python-wheel" ,python-wheel)))
    (home-page "https://github.com/boto/botocore")
    (synopsis "Low-level interface to AWS")
    (description "Botocore is a Python library that provides a low-level
@@ -8256,17 +8329,18 @@ interface to the Amazon Web Services (AWS) API.")
       (base32
        "0lclasm0wnayd3b8zl9l91i32nbgrhh0ncf9lksss4cv0myfwmfg"))))
    (build-system python-build-system)
-   (inputs
+   (propagated-inputs
     `(("python-colorama" ,python-colorama)
+      ("python-botocore" ,python-botocore)
+      ("python-s3transfer" ,python-s3transfer)
       ("python-docutils" ,python-docutils)
-      ("python-mock" ,python-mock)
+      ("python-rsa" ,python-rsa)))
+   (inputs
+    `(("python-mock" ,python-mock)
       ("python-nose" ,python-nose)
-      ("python-rsa" ,python-rsa)
       ("python-sphinx" ,python-sphinx)
       ("python-tox" ,python-tox)
-      ("python-wheel" ,python-wheel)
-      ("python-botocore" ,python-botocore)
-      ("python-s3transfer" ,python-s3transfer)))
+      ("python-wheel" ,python-wheel)))
    (home-page "http://aws.amazon.com/cli/")
    (synopsis "Command line client for AWS")
    (description "AWS CLI provides a unified command line interface to the
@@ -8403,9 +8477,10 @@ available in Django, but is a standalone package.")
         (base32
          "136kcjbs0s98qkx8a418b05dfblqp0kiiqyx8vhx4rarwc7bqi3n"))))
     (build-system python-build-system)
+    (propagated-inputs
+     `(("python-markupsafe" ,python-markupsafe)))
     (native-inputs
-     `(("python-markupsafe" ,python-markupsafe)
-       ("python-mock" ,python-mock)
+     `(("python-mock" ,python-mock)
        ("python-nose" ,python-nose)))
     (home-page "http://www.makotemplates.org/")
     (synopsis "Templating language for Python")
@@ -8487,7 +8562,6 @@ and to spawn subprocesses to handle requests.")
     (build-system python-build-system)
     (native-inputs
      `(("python-nose" ,python-nose)))
-    ;; Note: setuptools used at runtime for pkg_resources
     (home-page "http://pythonpaste.org/deploy/")
     (synopsis
      "Load, configure, and compose WSGI applications and servers")
@@ -8517,7 +8591,6 @@ file.")
     (build-system python-build-system)
     (native-inputs
      `(("python-nose" ,python-nose)))
-    ;; Note: setuptools used at runtime for pkg_resources
     (propagated-inputs
      `(("python-six" ,python-six)))
     (arguments
@@ -8560,7 +8633,6 @@ follows ideas flowing from WSGI (Web Standard Gateway Interface).")
     (build-system python-build-system)
     (native-inputs
      `(("python-nose" ,python-nose)))
-    ;; Note: setuptools used at runtime for pkg_resources
     (propagated-inputs
      `(("python-paste" ,python-paste)
        ("python-pastedeploy" ,python-pastedeploy)))
@@ -8767,8 +8839,8 @@ RabbitMQ messaging server is the most popular implementation.")
                 (strip-python2-variant python-kombu))))
     (package
       (inherit kombu)
-      (inputs `(("python2-unittest2" ,python2-unittest2)
-                ,@(package-inputs kombu))))))
+      (native-inputs `(("python2-unittest2" ,python2-unittest2)
+                ,@(package-native-inputs kombu))))))
 
 (define-public python-billiard
   (package
@@ -8829,8 +8901,6 @@ Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
      `(("python-nose" ,python-nose)))
     (propagated-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")
@@ -8916,8 +8986,7 @@ programmatically interfacing with your system's $EDITOR.")
                 "098as6z1s0gb4dh5xcr1fd2vpm91zj93jzvgawspxf5s4hqs0xhp"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)))
+     `(("python-sphinx" ,python-sphinx)))
     (synopsis "Sphinx extension to include program output")
     (description "A Sphinx extension to literally insert the output of arbitrary
 commands into documents, helping you to keep your command examples up to date.")
@@ -8939,8 +9008,7 @@ commands into documents, helping you to keep your command examples up to date.")
                 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
     (build-system python-build-system)
     (propagated-inputs
-     `(("python-docutils" ,python-docutils)
-       ("python-sphinx" ,python-sphinx)
+     `(("python-sphinx" ,python-sphinx)
        ("python-zope-interface" ,python-zope-interface)))
     (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
     (description "This package defines an extension for the Sphinx documentation
@@ -9097,10 +9165,10 @@ Python.")
        ;; https://github.com/getsentry/responses/issues/38
        #:tests? #f))
     (native-inputs
-     `(("python-cookies" ,python-cookies)
-       ("python-mock" ,python-mock)))
+     `(("python-mock" ,python-mock)))
     (propagated-inputs
      `(("python-requests" ,python-requests)
+       ("python-cookies" ,python-cookies)
        ("python-six" ,python-six)))
     (home-page "https://github.com/getsentry/responses")
     (synopsis "Utility for mocking out the `requests` Python library")
@@ -10531,10 +10599,10 @@ and/or Xon/Xoff.  The port is accessed in RAW mode.")
                                     "/include/SDL2"))
              #t)))))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("python-cython" ,python-cython)))
     (inputs
-     `(("python-cython" ,python-cython)
-       ("gstreamer" ,gstreamer)
+     `(("gstreamer" ,gstreamer)
        ("mesa" ,mesa)
        ("sdl-union"
         ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
@@ -10975,7 +11043,10 @@ failures.")
        (modify-phases %standard-phases
          (delete 'check)
          (add-after 'install 'check
-           (lambda _ ; It's easier to run tests after install.
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             ;; It's easier to run tests after install.
+             ;; Make installed package available for running the tests
+             (add-installed-pythonpath inputs outputs)
              (zero? (system* "py.test" "-vv")))))))
     (native-inputs
      `(("python-coverage" ,python-coverage)