summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2017-09-05 11:16:41 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2017-09-06 13:54:10 +0200
commit67651d80bc8baaf09ab91fec8ea423e09107ed8f (patch)
tree216a82ca309b80298039c2038160a22e94a1de6f
parent036bafe0b94fb99ee9d1eb3d2fb902293a9f39a6 (diff)
downloadnixlib-67651d80bc8baaf09ab91fec8ea423e09107ed8f.tar
nixlib-67651d80bc8baaf09ab91fec8ea423e09107ed8f.tar.gz
nixlib-67651d80bc8baaf09ab91fec8ea423e09107ed8f.tar.bz2
nixlib-67651d80bc8baaf09ab91fec8ea423e09107ed8f.tar.lz
nixlib-67651d80bc8baaf09ab91fec8ea423e09107ed8f.tar.xz
nixlib-67651d80bc8baaf09ab91fec8ea423e09107ed8f.tar.zst
nixlib-67651d80bc8baaf09ab91fec8ea423e09107ed8f.zip
Merge pull request #28884 from FRidh/python-fixes
Python: several fixes
-rw-r--r--pkgs/applications/networking/flexget/default.nix44
-rw-r--r--pkgs/development/python-modules/Cython/default.nix4
-rw-r--r--pkgs/development/python-modules/GeoIP/default.nix30
-rw-r--r--pkgs/development/python-modules/adal/default.nix4
-rw-r--r--pkgs/development/python-modules/aiohttp/default.nix36
-rw-r--r--pkgs/development/python-modules/attrs/default.nix28
-rw-r--r--pkgs/development/python-modules/backports_unittest-mock/default.nix22
-rw-r--r--pkgs/development/python-modules/beautifulsoup4/default.nix24
-rw-r--r--pkgs/development/python-modules/bkcharts/default.nix29
-rw-r--r--pkgs/development/python-modules/bokeh/default.nix82
-rw-r--r--pkgs/development/python-modules/chardet/default.nix22
-rw-r--r--pkgs/development/python-modules/cheroot/default.nix28
-rw-r--r--pkgs/development/python-modules/cherrypy/default.nix25
-rw-r--r--pkgs/development/python-modules/contextlib2/default.nix21
-rw-r--r--pkgs/development/python-modules/coverage/default.nix27
-rw-r--r--pkgs/development/python-modules/dask/default.nix4
-rw-r--r--pkgs/development/python-modules/dateutil/default.nix12
-rw-r--r--pkgs/development/python-modules/dill/default.nix32
-rw-r--r--pkgs/development/python-modules/discordpy/default.nix7
-rw-r--r--pkgs/development/python-modules/doc8/default.nix32
-rw-r--r--pkgs/development/python-modules/entrypoints/default.nix31
-rw-r--r--pkgs/development/python-modules/flask-compress/default.nix20
-rw-r--r--pkgs/development/python-modules/flask-cors/default.nix22
-rw-r--r--pkgs/development/python-modules/flask-migrate/default.nix4
-rw-r--r--pkgs/development/python-modules/flask-restful/default.nix29
-rw-r--r--pkgs/development/python-modules/flask-restplus/0.8.nix42
-rw-r--r--pkgs/development/python-modules/flask/default.nix21
-rw-r--r--pkgs/development/python-modules/flit/default.nix50
-rw-r--r--pkgs/development/python-modules/guessit/2.0.nix32
-rw-r--r--pkgs/development/python-modules/h5py/default.nix4
-rw-r--r--pkgs/development/python-modules/jinja2/default.nix31
-rw-r--r--pkgs/development/python-modules/jsonschema/default.nix30
-rw-r--r--pkgs/development/python-modules/keras/default.nix4
-rw-r--r--pkgs/development/python-modules/m2r/default.nix4
-rw-r--r--pkgs/development/python-modules/magic-wormhole/default.nix8
-rw-r--r--pkgs/development/python-modules/multidict/default.nix3
-rw-r--r--pkgs/development/python-modules/openpyxl/default.nix33
-rw-r--r--pkgs/development/python-modules/oslo-config/default.nix3
-rw-r--r--pkgs/development/python-modules/pandas/default.nix7
-rw-r--r--pkgs/development/python-modules/portend/default.nix23
-rw-r--r--pkgs/development/python-modules/prompt_toolkit/default.nix40
-rw-r--r--pkgs/development/python-modules/pycryptodome/default.nix4
-rw-r--r--pkgs/development/python-modules/pyroute2/default.nix4
-rw-r--r--pkgs/development/python-modules/pyshp/default.nix4
-rw-r--r--pkgs/development/python-modules/pytest-flake8/default.nix12
-rw-r--r--pkgs/development/python-modules/pytest-sugar/default.nix20
-rw-r--r--pkgs/development/python-modules/pytest-warnings/default.nix20
-rw-r--r--pkgs/development/python-modules/pytimeparse/default.nix4
-rw-r--r--pkgs/development/python-modules/requests/default.nix25
-rw-r--r--pkgs/development/python-modules/restructuredtext_lint/default.nix34
-rw-r--r--pkgs/development/python-modules/semver/default.nix4
-rw-r--r--pkgs/development/python-modules/service_identity/default.nix38
-rw-r--r--pkgs/development/python-modules/sphinx-testing/default.nix35
-rw-r--r--pkgs/development/python-modules/sqlalchemy-migrate/default.nix5
-rw-r--r--pkgs/development/python-modules/sqlmap/default.nix4
-rw-r--r--pkgs/development/python-modules/tempora/default.nix11
-rw-r--r--pkgs/development/python-modules/testtools/default.nix38
-rw-r--r--pkgs/development/python-modules/testtools/testtools_support_unittest2.patch (renamed from pkgs/development/python-modules/testtools_support_unittest2.patch)0
-rw-r--r--pkgs/development/python-modules/tornado/default.nix4
-rw-r--r--pkgs/development/python-modules/treq/default.nix17
-rw-r--r--pkgs/development/python-modules/twisted/default.nix16
-rw-r--r--pkgs/development/python-modules/txtorcon/default.nix39
-rw-r--r--pkgs/development/python-modules/tzlocal/default.nix24
-rw-r--r--pkgs/development/python-modules/urllib3/default.nix32
-rw-r--r--pkgs/development/python-modules/vcversioner/default.nix18
-rw-r--r--pkgs/development/python-modules/werkzeug/default.nix25
-rw-r--r--pkgs/development/python-modules/zetup/default.nix4
-rw-r--r--pkgs/development/python-modules/zxcvbn-python/default.nix4
-rw-r--r--pkgs/tools/admin/ansible/2.1.nix12
-rw-r--r--pkgs/tools/admin/ansible/2.2.nix9
-rw-r--r--pkgs/top-level/python-packages.nix706
71 files changed, 1365 insertions, 761 deletions
diff --git a/pkgs/applications/networking/flexget/default.nix b/pkgs/applications/networking/flexget/default.nix
index 814f6bb5548e..9e5e90996bcb 100644
--- a/pkgs/applications/networking/flexget/default.nix
+++ b/pkgs/applications/networking/flexget/default.nix
@@ -9,14 +9,14 @@
 with python.pkgs;
 
 buildPythonApplication rec {
-  version = "2.10.40";
+  version = "2.10.82";
   name = "FlexGet-${version}";
 
   src = fetchFromGitHub {
     owner = "Flexget";
     repo = "Flexget";
     rev = version;
-    sha256 = "0hh21yv1lvdfi198snwjabfsdh04fnpjszpgg28wvg5pd1qq8lqv";
+    sha256 = "15508ihswfjbkzhf1f0qhn2ar1aiibz2ggp5d6r33icy8xwhpv09";
   };
 
   doCheck = true;
@@ -27,30 +27,44 @@ buildPythonApplication rec {
     sed -i '/def test_non_ascii/i\    import pytest\
         @pytest.mark.skip' flexget/tests/test_filesystem.py
 
-    substituteInPlace requirements.txt --replace "guessit<=2.0.4" "guessit"
+    substituteInPlace requirements.txt \
+      --replace "chardet==3.0.3" "chardet" \
+      --replace "rebulk==0.8.2" "rebulk" \
+      --replace "cherrypy==10.2.2" "cherrypy" \
+      --replace "portend==1.8" "portend" \
+      --replace "sqlalchemy==1.1.10" "sqlalchemy" \
+      --replace "zxcvbn-python==4.4.15" "zxcvbn-python" \
+      --replace "flask-cors==3.0.2" "flask-cors" \
+      --replace "certifi==2017.4.17" "certifi"
   '';
 
-  # Disable 3 failing tests caused by guessit upgrade
-  # https://github.com/Flexget/Flexget/issues/1804
   checkPhase = ''
     export HOME=.
-    py.test --disable-pytest-warnings -k "not test_date_options and not test_ep_as_quality and not testFromGroup"
+    py.test --disable-pytest-warnings -k "not test_quality_failures \
+                                          and not test_group_quality \
+                                          and not crash_report \
+                                          and not test_multi_episode \
+                                          and not test_double_episodes \
+                                          and not test_inject_force \
+                                          and not test_double_prefered \
+                                          and not test_double"
   '';
 
   buildInputs = [ pytest mock vcrpy pytest-catchlog boto3 ];
   propagatedBuildInputs = [
-    feedparser sqlalchemy pyyaml
+    feedparser sqlalchemy pyyaml chardet
     beautifulsoup4 html5lib PyRSS2Gen pynzb
-    rpyc jinja2 requests dateutil jsonschema
-    pathpy guessit APScheduler
+    rpyc jinja2 jsonschema requests dateutil jsonschema
+    pathpy guessit_2_0 APScheduler
     terminaltables colorclass
-    cherrypy flask flask-restful flask-restplus_0_8
+    cherrypy flask flask-restful flask-restplus
     flask-compress flask_login flask-cors
-    pyparsing safe future zxcvbn-python ]
-  ++ lib.optional (pythonOlder "3.4") pathlib
-  # enable deluge and transmission plugin support, if they're installed
-  ++ lib.optional (config.deluge or false) deluge
-  ++ lib.optional (transmission != null) transmissionrpc;
+    pyparsing safe future zxcvbn-python
+    werkzeug tempora cheroot rebulk portend
+  ] ++ lib.optional (pythonOlder "3.4") pathlib
+    # enable deluge and transmission plugin support, if they're installed
+    ++ lib.optional (config.deluge or false) deluge
+    ++ lib.optional (transmission != null) transmissionrpc;
 
   meta = {
     homepage = https://flexget.com/;
diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix
index 3dd4b0acbafb..22f3579bae3f 100644
--- a/pkgs/development/python-modules/Cython/default.nix
+++ b/pkgs/development/python-modules/Cython/default.nix
@@ -14,11 +14,11 @@
 buildPythonPackage rec {
   pname = "Cython";
   name = "${pname}-${version}";
-  version = "0.26";
+  version = "0.26.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "4c24e2c22ddaed624d35229dc5db25049e9e225c6f64f3364326836cad8f2c66";
+    sha256 = "c2e63c4794161135adafa8aa4a855d6068073f421c83ffacc39369497a189dd5";
   };
 
   # With Python 2.x on i686-linux or 32-bit ARM this test fails because the
diff --git a/pkgs/development/python-modules/GeoIP/default.nix b/pkgs/development/python-modules/GeoIP/default.nix
new file mode 100644
index 000000000000..6c4453774ced
--- /dev/null
+++ b/pkgs/development/python-modules/GeoIP/default.nix
@@ -0,0 +1,30 @@
+{lib, buildPythonPackage, fetchPypi, isPy3k, incremental, ipaddress, twisted
+, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof
+, geoip, nose}:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "GeoIP";
+  version = "1.3.2";
+
+  checkInputs = [ nose ];
+  propagatedBuildInputs = [
+    geoip
+  ];
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1rphxf3vrn8wywjgr397f49s0s22m83lpwcq45lm0h2p45mdm458";
+  };
+
+  # Tests cannot be run because they require data that isn't included in the
+  # release tarball.
+  checkPhase = "true";
+
+  meta = {
+    description = "MaxMind GeoIP Legacy Database - Python API";
+    homepage = http://www.maxmind.com/;
+    maintainers = with lib.maintainers; [ jluttine ];
+    license = lib.licenses.lgpl21Plus;
+  };
+}
diff --git a/pkgs/development/python-modules/adal/default.nix b/pkgs/development/python-modules/adal/default.nix
index 4673e5461d3a..a1fb96673957 100644
--- a/pkgs/development/python-modules/adal/default.nix
+++ b/pkgs/development/python-modules/adal/default.nix
@@ -3,12 +3,12 @@
 
 buildPythonPackage rec {
   pname = "adal";
-  version = "0.4.6";
+  version = "0.4.7";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "7c5bbf4d8a17d535e6e857b28a41cedddc2767fc57424c15d484fa779bb97325";
+    sha256 = "114046ac85d0054791c21b00922f26286822bc6f2ba3716db42e7e57f762ef20";
   };
 
   propagatedBuildInputs =  [ requests pyjwt dateutil ];
diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix
new file mode 100644
index 000000000000..72b28d01ceab
--- /dev/null
+++ b/pkgs/development/python-modules/aiohttp/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+, chardet
+, multidict
+, async-timeout
+, yarl
+, pytest
+, gunicorn
+, pytest-raisesregexp
+}:
+
+buildPythonPackage rec {
+  pname = "aiohttp";
+  version = "2.2.5";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "af5bfdd164256118a0a306b3f7046e63207d1f8cba73a67dcc0bd858dcfcd3bc";
+  };
+
+  disabled = pythonOlder "3.4";
+
+  doCheck = false; # Too many tests fail.
+
+  checkInputs = [ pytest gunicorn pytest-raisesregexp ];
+  propagatedBuildInputs = [ async-timeout chardet multidict yarl ];
+
+  meta = {
+    description = "Http client/server for asyncio";
+    license = with lib.licenses; [ asl20 ];
+    homepage = https://github.com/KeepSafe/aiohttp/;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/attrs/default.nix b/pkgs/development/python-modules/attrs/default.nix
new file mode 100644
index 000000000000..e58bf3846dc9
--- /dev/null
+++ b/pkgs/development/python-modules/attrs/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, buildPythonPackage, fetchPypi, pytest, hypothesis, zope_interface
+, pympler, coverage, six, clang }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "attrs";
+  version = "17.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "04gx08ikpk26wnq22f7l42gapcvk8iz1512r927k6sadz6cinkax";
+  };
+
+  # macOS needs clang for testing
+  buildInputs = [
+    pytest hypothesis zope_interface pympler coverage six
+  ] ++ lib.optionals (stdenv.isDarwin) [ clang ];
+
+  checkPhase = ''
+    py.test
+  '';
+
+  meta = with lib; {
+    description = "Python attributes without boilerplate";
+    homepage = https://github.com/hynek/attrs;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/backports_unittest-mock/default.nix b/pkgs/development/python-modules/backports_unittest-mock/default.nix
new file mode 100644
index 000000000000..e64f51fe7ca1
--- /dev/null
+++ b/pkgs/development/python-modules/backports_unittest-mock/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonPackage, fetchPypi, setuptools_scm, mock }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "backports.unittest_mock";
+  version = "1.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0xdkx5wf5a2w2zd2pshk7z2cvbv6db64c1x6v9v1a18ja7bn9nf6";
+  };
+
+  propagatedBuildInputs = [ mock ];
+
+  buildInputs = [ setuptools_scm ];
+
+  meta = with stdenv.lib; {
+    description = "Provides a function install() which makes the mock module";
+    homepage = https://github.com/jaraco/backports.unittest_mock;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/beautifulsoup4/default.nix b/pkgs/development/python-modules/beautifulsoup4/default.nix
new file mode 100644
index 000000000000..fd8bddee14b6
--- /dev/null
+++ b/pkgs/development/python-modules/beautifulsoup4/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildPythonPackage, fetchPypi, nose }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "beautifulsoup4";
+  version = "4.6.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "12cf0ygpz9srpfh9gx2f9ba0swa1rzypv3sm4r0hmjyw6b4nm2w0";
+  };
+
+  buildInputs = [ nose ];
+  checkPhase = ''
+    nosetests build
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://crummy.com/software/BeautifulSoup/bs4/;
+    description = "HTML and XML parser";
+    license = licenses.mit;
+    maintainers = with maintainers; [ domenkozar ];
+  };
+}
diff --git a/pkgs/development/python-modules/bkcharts/default.nix b/pkgs/development/python-modules/bkcharts/default.nix
new file mode 100644
index 000000000000..dee19b45f449
--- /dev/null
+++ b/pkgs/development/python-modules/bkcharts/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, numpy
+, pandas
+}:
+
+
+buildPythonPackage rec {
+  pname = "bkcharts";
+  version = "0.2";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit version pname;
+    sha256 = "a5eaa8e78853dcecaa46345812e4fabe9cd3b96330ebf0809f640a4a0556d72e";
+  };
+
+  propagatedBuildInputs = [ numpy pandas ];
+
+  # Circular test dependency on bokeh
+  doCheck = false;
+
+  meta = {
+    description = "High level chart types built on top of Bokeh";
+    homepage = http://github.com/bokeh/bkcharts;
+    license = lib.licenses.bsd3;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/bokeh/default.nix b/pkgs/development/python-modules/bokeh/default.nix
new file mode 100644
index 000000000000..43c176a09ec6
--- /dev/null
+++ b/pkgs/development/python-modules/bokeh/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, isPyPy
+, mock
+, pytest
+, flask
+, jinja2
+, markupsafe
+, werkzeug
+, itsdangerous
+, dateutil
+, requests
+, six
+, pygments
+, pystache
+, markdown
+, pyyaml
+, pyzmq
+, tornado
+, colorama
+, isPy3k
+, futures
+, websocket_client
+, numpy
+, pandas
+, greenlet
+, python
+, bkcharts
+, pillow
+, selenium
+}:
+
+buildPythonPackage rec {
+  pname = "bokeh";
+  name = "${pname}${version}";
+  version = "0.12.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "2c42c95bf1a418c758dbff8446b4f5e5fc72ac10ea5da4e6b5010067396d0880";
+  };
+
+  disabled = isPyPy;
+
+  # Some test that uses tornado fails
+#   doCheck = false;
+
+  checkInputs = [ mock pytest pillow selenium ];
+
+  propagatedBuildInputs = [
+    flask
+    jinja2
+    markupsafe
+    werkzeug
+    itsdangerous
+    dateutil
+    requests
+    six
+    pygments
+    pystache
+    markdown
+    pyyaml
+    pyzmq
+    tornado
+    colorama
+    bkcharts
+  ]
+  ++ lib.optionals ( !isPy3k ) [ futures ]
+  ++ lib.optionals ( !isPy3k && !isPyPy ) [ websocket_client ]
+  ++ lib.optionals ( !isPyPy ) [ numpy pandas greenlet ];
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest discover -s bokeh/tests
+  '';
+
+  meta = {
+    description = "Statistical and novel interactive HTML plots for Python";
+    homepage = "http://github.com/bokeh/bokeh";
+    license = lib.licenses.bsd3;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/chardet/default.nix b/pkgs/development/python-modules/chardet/default.nix
new file mode 100644
index 000000000000..7e50dca40660
--- /dev/null
+++ b/pkgs/development/python-modules/chardet/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, pytest, pytestrunner, hypothesis }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "chardet";
+  version = "3.0.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4";
+  };
+
+  buildInputs = [ pytest pytestrunner hypothesis ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/chardet/chardet;
+    description = "Universal encoding detector";
+    license = licenses.lgpl2;
+    maintainers = with maintainers; [ domenkozar ];
+  };
+}
diff --git a/pkgs/development/python-modules/cheroot/default.nix b/pkgs/development/python-modules/cheroot/default.nix
new file mode 100644
index 000000000000..c20cbabe0d61
--- /dev/null
+++ b/pkgs/development/python-modules/cheroot/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchPypi, buildPythonPackage
+, six
+, coverage, codecov, pytest, pytestcov, pytest-sugar, portend
+, backports_unittest-mock, setuptools_scm }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "cheroot";
+  version = "5.5.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1fhyk8lgs2blfx4zjvwsy6f0ynrs5fwnnr3qf07r6c4j3gwlkqsr";
+  };
+
+  propagatedBuildInputs = [ six ];
+  buildInputs = [ coverage codecov pytest pytestcov pytest-sugar portend backports_unittest-mock setuptools_scm ];
+
+  checkPhase = ''
+    py.test cheroot
+  '';
+
+  meta = with stdenv.lib; {
+    description = "High-performance, pure-Python HTTP";
+    homepage = https://github.com/cherrypy/cheroot;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/cherrypy/default.nix b/pkgs/development/python-modules/cherrypy/default.nix
new file mode 100644
index 000000000000..cffffde8e3d1
--- /dev/null
+++ b/pkgs/development/python-modules/cherrypy/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, buildPythonPackage, fetchPypi, isPy3k
+, pytest, setuptools_scm, pytestrunner
+, six, cheroot, portend }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "CherryPy";
+  version = "11.0.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1037pvhab4my791vfzikm649ny52fj7x2q87cnncmbnqin6ghwan";
+  };
+
+  # wsgiserver.ssl_pyopenssl is broken on py3k.
+  doCheck = !isPy3k;
+  buildInputs = [ pytest setuptools_scm pytestrunner ];
+  propagatedBuildInputs = [ six cheroot portend ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.cherrypy.org";
+    description = "A pythonic, object-oriented HTTP framework";
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/contextlib2/default.nix b/pkgs/development/python-modules/contextlib2/default.nix
new file mode 100644
index 000000000000..cadaa8914b21
--- /dev/null
+++ b/pkgs/development/python-modules/contextlib2/default.nix
@@ -0,0 +1,21 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "contextlib2";
+  version = "0.5.5";
+  name = "${pname}-${version}";
+
+  src = fetchPypi rec {
+    inherit pname version;
+    sha256 = "509f9419ee91cdd00ba34443217d5ca51f5a364a404e1dce9e8979cea969ca48";
+  };
+
+  meta = {
+    description = "Backports and enhancements for the contextlib module";
+    homepage = http://contextlib2.readthedocs.org/;
+    license = lib.licenses.psfl;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/coverage/default.nix b/pkgs/development/python-modules/coverage/default.nix
new file mode 100644
index 000000000000..137cef06b9e2
--- /dev/null
+++ b/pkgs/development/python-modules/coverage/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, isPy3k
+, mock
+}:
+
+buildPythonPackage rec {
+  pname = "coverage";
+  version = "4.4.1";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "7a9c44400ee0f3b4546066e0710e1250fd75831adc02ab99dda176ad8726f424";
+  };
+
+  # No tests in archive
+  doCheck = false;
+  checkInputs = [ mock ];
+
+  meta = {
+    description = "Code coverage measurement for python";
+    homepage = http://nedbatchelder.com/code/coverage/;
+    license = lib.licenses.bsd3;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix
index 32d925f36485..b1d39e493b7a 100644
--- a/pkgs/development/python-modules/dask/default.nix
+++ b/pkgs/development/python-modules/dask/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "dask";
-  version = "0.15.1";
+  version = "0.15.2";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "f62f19ab5958b13d0ee733db18218c28a9d452a3554446a3dfb5ac3d4a5f7e34";
+    sha256 = "abe6758540fdbc260f14ee71cebc3ab88682e24ff147afa89375b7006f57d3ed";
   };
 
   checkInputs = [ pytest ];
diff --git a/pkgs/development/python-modules/dateutil/default.nix b/pkgs/development/python-modules/dateutil/default.nix
index c814b82dad01..b980381edbb1 100644
--- a/pkgs/development/python-modules/dateutil/default.nix
+++ b/pkgs/development/python-modules/dateutil/default.nix
@@ -1,12 +1,12 @@
-{ stdenv, buildPythonPackage, fetchurl, six }:
+{ stdenv, buildPythonPackage, fetchPypi, six }:
 buildPythonPackage rec {
-  pname = "dateutil";
   name = "${pname}-${version}";
-  version = "2.6.0";
+  pname = "python-dateutil";
+  version = "2.6.1";
 
-  src = fetchurl {
-    url = "mirror://pypi/p/python-dateutil/python-${name}.tar.gz";
-    sha256 = "1lhq0hxjc3cfha101q02ld5ijlpfyjn2w1yh7wvpiy367pgzi8k2";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1jkahssf0ir5ssxc3ydbp8cpv77limn8d4s77szb2nrgl2r3h749";
   };
 
   propagatedBuildInputs = [ six ];
diff --git a/pkgs/development/python-modules/dill/default.nix b/pkgs/development/python-modules/dill/default.nix
new file mode 100644
index 000000000000..79c87772ffe7
--- /dev/null
+++ b/pkgs/development/python-modules/dill/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, python
+}:
+
+buildPythonPackage rec {
+  pname = "dill";
+  version = "0.2.7.1";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "97fd758f5fe742d42b11ec8318ecfcff8776bccacbfcec05dfd6276f5d450f73";
+  };
+
+  # Messy test suite. Even when running the tests like tox does, it fails
+  doCheck = false;
+  checkPhase = ''
+    for test in tests/*.py; do
+      ${python.interpreter} $test
+    done
+  '';
+  # Following error without setting checkPhase
+  # TypeError: don't know how to make test from: {'byref': False, 'recurse': False, 'protocol': 3, 'fmode': 0}
+
+  meta = {
+    description = "Serialize all of python (almost)";
+    homepage = http://www.cacr.caltech.edu/~mmckerns/dill.htm;
+    license = lib.licenses.bsd3;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/discordpy/default.nix b/pkgs/development/python-modules/discordpy/default.nix
index eebcd802dd61..c9ae73b1661d 100644
--- a/pkgs/development/python-modules/discordpy/default.nix
+++ b/pkgs/development/python-modules/discordpy/default.nix
@@ -11,13 +11,13 @@
 
 let
   pname = "discord.py";
-  version = "0.16.10";
+  version = "0.16.11";
 in buildPythonPackage rec {
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-    sha256 = "cb0b9ad5f5edf2d5afd5f5ce07381a0a089eb036004938126a5582fc8fa0cc88";
+    sha256 = "eb3c6faa7d4570cce05533d0742bbcb768629e2b3ba9e1cc79c05833db91ac4d";
   };
 
   propagatedBuildInputs = [ asyncio aiohttp websockets pynacl ];
@@ -31,6 +31,9 @@ in buildPythonPackage rec {
 
   disabled = pythonOlder "3.5";
 
+  # No tests in archive
+  doCheck = false;
+
   meta = {
     description = "A python wrapper for the Discord API";
     homepage    = "https://discordpy.rtfd.org/";
diff --git a/pkgs/development/python-modules/doc8/default.nix b/pkgs/development/python-modules/doc8/default.nix
new file mode 100644
index 000000000000..cb91014d6ef2
--- /dev/null
+++ b/pkgs/development/python-modules/doc8/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pbr
+, docutils
+, six
+, chardet
+, stevedore
+, restructuredtext_lint
+}:
+
+buildPythonPackage rec {
+  pname = "doc8";
+  version = "0.8.0";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "2df89f9c1a5abfb98ab55d0175fed633cae0cf45025b8b1e0ee5ea772be28543";
+  };
+
+  buildInputs = [ pbr ];
+  propagatedBuildInputs = [ docutils six chardet stevedore restructuredtext_lint ];
+
+  doCheck = false;
+
+  meta = {
+    description = "Style checker for Sphinx (or other) RST documentation";
+    homepage = "https://launchpad.net/doc8";
+    license = lib.licenses.asl20;
+  };
+}
diff --git a/pkgs/development/python-modules/entrypoints/default.nix b/pkgs/development/python-modules/entrypoints/default.nix
new file mode 100644
index 000000000000..d812fd55a887
--- /dev/null
+++ b/pkgs/development/python-modules/entrypoints/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, configparser
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "entrypoints";
+  version = "0.2.3";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "d2d587dde06f99545fb13a383d2cd336a8ff1f359c5839ce3a64c917d10c029f";
+  };
+
+  checkInputs = [ pytest];
+
+  propagatedBuildInputs = [ configparser ];
+
+  checkPhase = ''
+    py.test tests
+  '';
+
+  meta = {
+    description = "Discover and load entry points from installed packages";
+    homepage = https://github.com/takluyver/entrypoints;
+    license = lib.licenses.mit;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/flask-compress/default.nix b/pkgs/development/python-modules/flask-compress/default.nix
new file mode 100644
index 000000000000..c46fce2fe757
--- /dev/null
+++ b/pkgs/development/python-modules/flask-compress/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchPypi, buildPythonPackage, flask }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  version = "1.4.0";
+  pname = "Flask-Compress";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1cxdbdiyxkspg7vkchfmaqr7c6q79gwvakna3fjcc6nivps971j6";
+  };
+
+  propagatedBuildInputs = [ flask ];
+
+  meta = with stdenv.lib; {
+    description = "Compress responses in your Flask app with gzip";
+    homepage = "https://libwilliam.github.io/flask-compress/";
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/flask-cors/default.nix b/pkgs/development/python-modules/flask-cors/default.nix
new file mode 100644
index 000000000000..acd9430316b4
--- /dev/null
+++ b/pkgs/development/python-modules/flask-cors/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchPypi, buildPythonPackage
+, nose, flask, six }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "Flask-Cors";
+  version = "3.0.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "62ebc5ad80dc21ca0ea9f57466c2c74e24a62274af890b391790c260eb7b754b";
+  };
+
+  buildInputs = [ nose ];
+  propagatedBuildInputs = [ flask six ];
+
+  meta = with stdenv.lib; {
+    description = "A Flask extension adding a decorator for CORS support";
+    homepage = https://github.com/corydolphin/flask-cors;
+    license = with licenses; [ mit ];
+  };
+}
diff --git a/pkgs/development/python-modules/flask-migrate/default.nix b/pkgs/development/python-modules/flask-migrate/default.nix
index dc94be8f6005..1a4bd11a1fa3 100644
--- a/pkgs/development/python-modules/flask-migrate/default.nix
+++ b/pkgs/development/python-modules/flask-migrate/default.nix
@@ -5,12 +5,12 @@ with stdenv.lib;
 
 buildPythonPackage rec {
   pname = "Flask-Migrate";
-  version = "2.1.0";
+  version = "2.1.1";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "716d5b68eec53821f80b3fbcb0fd60baed0cb0e320abb30289e83217668cef7f";
+    sha256 = "b709ca8642559c3c5a81a33ab10839fa052177accd5ba821047a99db635255ed";
   };
 
   checkInputs = optional isPy3k glibcLocales;
diff --git a/pkgs/development/python-modules/flask-restful/default.nix b/pkgs/development/python-modules/flask-restful/default.nix
new file mode 100644
index 000000000000..c54c015af123
--- /dev/null
+++ b/pkgs/development/python-modules/flask-restful/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, buildPythonPackage, fetchPypi, isPy3k
+, nose, mock, blinker
+, flask, six, pytz, aniso8601, pycrypto
+}:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "Flask-RESTful";
+  version = "0.3.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "01rlvl2iq074ciyn4schmjip7cyplkwkysbb8f610zil06am35ap";
+  };
+
+# TypeError: Only byte strings can be passed to C code
+  patchPhase = if isPy3k then ''
+    rm tests/test_crypto.py tests/test_paging.py
+    '' else null;
+  buildInputs = [ nose mock blinker ];
+  propagatedBuildInputs = [ flask six pytz aniso8601 pycrypto ];
+  PYTHON_EGG_CACHE = "`pwd`/.egg-cache";
+
+  meta = with stdenv.lib; {
+    homepage = "http://flask-restful.readthedocs.io/";
+    description = "REST API building blocks for Flask";
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/flask-restplus/0.8.nix b/pkgs/development/python-modules/flask-restplus/0.8.nix
deleted file mode 100644
index 2c415ec47e38..000000000000
--- a/pkgs/development/python-modules/flask-restplus/0.8.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, nose
-, blinker
-, tzlocal
-, mock
-, rednose
-, flask
-, six
-, jsonschema
-, pytz
-, aniso8601
-, flask-restful
-}:
-
-buildPythonPackage rec {
-  pname = "flask-restplus";
-  version = "0.8.6";
-  name = "${pname}-${version}";
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "3bb76cc156b9a09da62396d82b29fa31e4f27cccf79528538fe7155cf2785593";
-  };
-
-  checkInputs = [ nose blinker tzlocal mock rednose ];
-  propagatedBuildInputs = [ flask six jsonschema pytz aniso8601 flask-restful ];
-
-  # RuntimeError: Working outside of application context.
-  doCheck = false;
-
-  checkPhase = ''
-    nosetests
-  '';
-
-  meta = {
-    homepage = https://github.com/noirbizarre/flask-restplus;
-    description = "Fast, easy and documented API development with Flask";
-    license = lib.licenses.mit;
-  };
-}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/flask/default.nix b/pkgs/development/python-modules/flask/default.nix
new file mode 100644
index 000000000000..b16dc08a5e16
--- /dev/null
+++ b/pkgs/development/python-modules/flask/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, itsdangerous, click, werkzeug, jinja2 }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  version = "0.12.2";
+  pname = "Flask";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1hfs2jr2m5lr51xd4gblb28rncd0xrpycz6c07cyqsbv4dhl9x29";
+  };
+
+  propagatedBuildInputs = [ itsdangerous click werkzeug jinja2 ];
+
+  meta = with stdenv.lib; {
+    homepage = http://flask.pocoo.org/;
+    description = "A microframework based on Werkzeug, Jinja 2, and good intentions";
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/flit/default.nix b/pkgs/development/python-modules/flit/default.nix
new file mode 100644
index 000000000000..2154feeebb7c
--- /dev/null
+++ b/pkgs/development/python-modules/flit/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, fetchurl
+, isPy3k
+, docutils
+, requests
+, requests_download
+, zipfile36
+, pythonOlder
+, pytest
+, testpath
+, responses
+}:
+
+# Flit is actually an application to build universal wheels.
+# It requires Python 3 and should eventually be moved outside of
+# python-packages.nix. When it will be used to build wheels,
+# care should be taken that there is no mingling of PYTHONPATH.
+
+buildPythonPackage rec {
+  pname = "flit";
+  version = "0.11.4";
+  name = "${pname}-${version}";
+
+#   format = "wheel";
+
+  src = fetchPypi {
+    inherit pname version;
+#     url = https://files.pythonhosted.org/packages/24/98/50a090112a04d9e29155c31a222637668b0a4dd778fefcd3132adc50e877/flit-0.10-py3-none-any.whl;
+    sha256 = "8ba7603cc3bf4149d81811d40fe331abc45ff37a207c63f5f712a0fdb69297bb";
+  };
+
+  disabled = !isPy3k;
+  propagatedBuildInputs = [ docutils requests requests_download ] ++ lib.optional (pythonOlder "3.6") zipfile36;
+
+  checkInputs = [ pytest testpath responses ];
+
+  # Disable test that needs some ini file.
+  checkPhase = ''
+    py.test -k "not test_invalid_classifier"
+  '';
+
+  meta = {
+    description = "A simple packaging tool for simple packages";
+    homepage = https://github.com/takluyver/flit;
+    license = lib.licenses.bsd3;
+    maintainer = lib.maintainers.fridh;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/guessit/2.0.nix b/pkgs/development/python-modules/guessit/2.0.nix
new file mode 100644
index 000000000000..960babd84e2b
--- /dev/null
+++ b/pkgs/development/python-modules/guessit/2.0.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytestrunner
+, dateutil
+, babelfish
+, rebulk
+}:
+
+buildPythonPackage rec {
+  pname = "guessit";
+  version = "2.0.4";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1cfcgb0px6i9jl8nwkx8j06j4y6p5975a9pfmd8lcacwr8gy4wjg";
+  };
+
+  # Tests require more packages.
+  doCheck = false;
+  buildInputs = [ pytestrunner ];
+  propagatedBuildInputs = [
+    dateutil babelfish rebulk
+  ];
+
+  meta = {
+    homepage = http://pypi.python.org/pypi/guessit;
+    license = lib.licenses.lgpl3;
+    description = "A library for guessing information from video files";
+  };
+}
diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix
index 0bc8b969f5ae..9b2821380b98 100644
--- a/pkgs/development/python-modules/h5py/default.nix
+++ b/pkgs/development/python-modules/h5py/default.nix
@@ -11,13 +11,13 @@ let
   mpiSupport = hdf5.mpiSupport;
 
 in buildPythonPackage rec {
-  version = "2.7.0";
+  version = "2.7.1";
   pname = "h5py";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/h/h5py/${name}.tar.gz";
-    sha256 = "79254312df2e6154c4928f5e3b22f7a2847b6e5ffb05ddc33e37b16e76d36310";
+    sha256 = "180a688311e826ff6ae6d3bda9b5c292b90b28787525ddfcb10a29d5ddcae2cc";
   };
 
   configure_flags = "--hdf5=${hdf5}" + optionalString mpiSupport " --mpi";
diff --git a/pkgs/development/python-modules/jinja2/default.nix b/pkgs/development/python-modules/jinja2/default.nix
new file mode 100644
index 000000000000..ca286ae06aab
--- /dev/null
+++ b/pkgs/development/python-modules/jinja2/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, markupsafe }:
+
+buildPythonPackage rec {
+  pname = "Jinja2";
+  version = "2.9.6";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1zzrkywhziqffrzks14kzixz7nd4yh2vc0fb04a68vfd2ai03anx";
+  };
+
+  propagatedBuildInputs = [ markupsafe ];
+
+  # No tests included
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = http://jinja.pocoo.org/;
+    description = "Stand-alone template engine";
+    license = licenses.bsd3;
+    longDescription = ''
+      Jinja2 is a template engine written in pure Python. It provides a
+      Django inspired non-XML syntax but supports inline expressions and
+      an optional sandboxed environment.
+      '';
+    platforms = platforms.all;
+    maintainers = with maintainers; [ pierron garbas sjourdois ];
+  };
+}
diff --git a/pkgs/development/python-modules/jsonschema/default.nix b/pkgs/development/python-modules/jsonschema/default.nix
new file mode 100644
index 000000000000..cd29d7b5d310
--- /dev/null
+++ b/pkgs/development/python-modules/jsonschema/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, buildPythonPackage, fetchPypi, python
+, nose, mock, vcversioner, functools32 }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "jsonschema";
+  version = "2.6.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg";
+  };
+
+  buildInputs = [ nose mock vcversioner ];
+  propagatedBuildInputs = [ functools32 ];
+
+  patchPhase = ''
+    substituteInPlace jsonschema/tests/test_jsonschema_test_suite.py \
+      --replace "python" "${python}/bin/${python.executable}"
+  '';
+
+  checkPhase = "nosetests";
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/Julian/jsonschema;
+    description = "An implementation of JSON Schema validation for Python";
+    license = licenses.mit;
+    maintainers = with maintainers; [ domenkozar ];
+  };
+}
diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix
index 51c15ad68135..1379d93c6dd5 100644
--- a/pkgs/development/python-modules/keras/default.nix
+++ b/pkgs/development/python-modules/keras/default.nix
@@ -12,12 +12,12 @@
 
 buildPythonPackage rec {
   pname = "Keras";
-  version = "2.0.7";
+  version = "2.0.8";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "a6c72ee2b94be1ffefe7e77b69582b9827211f0c356b2189459711844d3634c0";
+    sha256 = "899dc6aaed366f20100b9f80cf1093ea5b43eecc74afd1dc63a4e48dfa776ab9";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/m2r/default.nix b/pkgs/development/python-modules/m2r/default.nix
index 39498919708b..066a9856e500 100644
--- a/pkgs/development/python-modules/m2r/default.nix
+++ b/pkgs/development/python-modules/m2r/default.nix
@@ -3,11 +3,11 @@
 buildPythonPackage rec {
   pname = "m2r";
   name = "${pname}-${version}";
-  version = "0.1.10";
+  version = "0.1.11";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "cfb5b8a37defdd594eb46a794b87d9b4ca1902b0e8e309c9f2623f7275c261d6";
+    sha256 = "7e69fe9b2752926c33399709e354da3bcca60043c7bf5e727b7126ec3a5db7db";
   };
 
   propagatedBuildInputs = [ mistune docutils ];
diff --git a/pkgs/development/python-modules/magic-wormhole/default.nix b/pkgs/development/python-modules/magic-wormhole/default.nix
index 7fedf4d48bbd..cc1e663209ec 100644
--- a/pkgs/development/python-modules/magic-wormhole/default.nix
+++ b/pkgs/development/python-modules/magic-wormhole/default.nix
@@ -17,6 +17,7 @@
 , humanize
 , pyopenssl
 , service-identity
+, txtorcon
 }:
 
 buildPythonPackage rec {
@@ -31,14 +32,11 @@ buildPythonPackage rec {
 
   checkInputs = [ mock ];
   buildInputs = [ nettools glibcLocales ];
-  propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ipaddress humanize pyopenssl service-identity ];
+  propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ipaddress humanize pyopenssl service-identity txtorcon ];
 
   postPatch = ''
     sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py
-    sed -i -e "s|if (os.path.dirname(os.path.abspath(wormhole))|if not os.path.abspath(wormhole).startswith('/nix/store') and (os.path.dirname(os.path.abspath(wormhole))|" src/wormhole/test/test_scripts.py
-    # XXX: disable one test due to warning:
-    # setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-    sed -i -e "s|def test_text_subprocess|def skip_test_text_subprocess|" src/wormhole/test/test_scripts.py
+    sed -i -e "s|if (os.path.dirname(os.path.abspath(wormhole))|if not os.path.abspath(wormhole).startswith('/nix/store') and (os.path.dirname(os.path.abspath(wormhole))|" src/wormhole/test/test_cli.py
   '' + lib.optionalString (pythonAtLeast "3.3") ''
     sed -i -e 's|"ipaddress",||' setup.py
   '';
diff --git a/pkgs/development/python-modules/multidict/default.nix b/pkgs/development/python-modules/multidict/default.nix
index fc0bdf906275..4141b69f0cdc 100644
--- a/pkgs/development/python-modules/multidict/default.nix
+++ b/pkgs/development/python-modules/multidict/default.nix
@@ -3,6 +3,7 @@
 , buildPythonPackage
 , pytest
 , isPy3k
+, psutil
 }:
 
 let
@@ -16,7 +17,7 @@ in buildPythonPackage rec {
     sha256 = "875f80a046e7799b40df4b015b8fc5dae91697936872a8d7362c909a02ec6d12";
   };
 
-  buildInputs = [ pytest ];
+  checkInputs = [ pytest psutil ];
 
   checkPhase = ''
     py.test
diff --git a/pkgs/development/python-modules/openpyxl/default.nix b/pkgs/development/python-modules/openpyxl/default.nix
new file mode 100644
index 000000000000..a214af5eab7f
--- /dev/null
+++ b/pkgs/development/python-modules/openpyxl/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytest
+, jdcal
+, et_xmlfile
+, lxml
+}:
+
+buildPythonPackage rec {
+  pname = "openpyxl";
+  version = "2.4.8";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "ee7551efb70648fa8ee569c2b6a6dbbeff390cc94b321da5d508a573b90a4f17";
+  };
+
+  checkInputs = [ pytest ];
+  propagatedBuildInputs = [ jdcal et_xmlfile lxml ];
+
+  # Tests are not included in archive.
+  # https://bitbucket.org/openpyxl/openpyxl/issues/610
+  doCheck = false;
+
+  meta = {
+    description = "A Python library to read/write Excel 2007 xlsx/xlsm files";
+    homepage = https://openpyxl.readthedocs.org;
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ lihop sjourdois ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/oslo-config/default.nix b/pkgs/development/python-modules/oslo-config/default.nix
index 6323e72e2a5c..51b2f0df75dc 100644
--- a/pkgs/development/python-modules/oslo-config/default.nix
+++ b/pkgs/development/python-modules/oslo-config/default.nix
@@ -19,4 +19,7 @@ buildPythonPackage rec {
   postPatch = ''
     substituteInPlace requirements.txt --replace "argparse" ""
   '';
+
+  # Requires a bunch of new packages
+  meta.broken = true;
 }
diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix
index ca3f20d7ca3e..7bab184bb2a0 100644
--- a/pkgs/development/python-modules/pandas/default.nix
+++ b/pkgs/development/python-modules/pandas/default.nix
@@ -76,8 +76,13 @@ in buildPythonPackage rec {
     chmod a+x pbcopy pbpaste
     export PATH=$(pwd):$PATH
   '' + ''
+    # since dateutil 0.6.0 the following fails: test_fallback_plural, test_ambiguous_flags, test_ambiguous_compat
+    # was supposed to be solved by https://github.com/dateutil/dateutil/issues/321, but is not the case
     py.test $out/${python.sitePackages}/pandas --skip-slow --skip-network \
-      ${if isDarwin then "-k 'not test_locale and not test_clipboard'" else ""}
+      -k "not test_fallback_plural and \
+          not test_ambiguous_flags and \
+          not test_ambiguous_compat \
+          ${optionalString isDarwin "and not test_locale and not test_clipboard"}"
     runHook postCheck
   '';
 
diff --git a/pkgs/development/python-modules/portend/default.nix b/pkgs/development/python-modules/portend/default.nix
new file mode 100644
index 000000000000..cb418678a996
--- /dev/null
+++ b/pkgs/development/python-modules/portend/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, pytest, pytest-sugar, pytest-warnings, setuptools_scm
+, tempora }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "portend";
+  version = "2.1.2";
+
+  buildInputs = [ pytest pytest-sugar pytest-warnings setuptools_scm ];
+  propagatedBuildInputs = [ tempora ];
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0dx8b1rn64ymx5s4mdzlw5hz59qi167z7nny36dl75ghlldn41w4";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Monitor TCP ports for bound or unbound states";
+    homepage = https://github.com/jaraco/portend;
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/prompt_toolkit/default.nix b/pkgs/development/python-modules/prompt_toolkit/default.nix
new file mode 100644
index 000000000000..9704f1b92c96
--- /dev/null
+++ b/pkgs/development/python-modules/prompt_toolkit/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytest
+, docopt
+, six
+, wcwidth
+, pygments
+}:
+
+buildPythonPackage rec {
+  pname = "prompt_toolkit";
+  name = "${pname}-${version}";
+  version = "1.0.15";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "858588f1983ca497f1cf4ffde01d978a3ea02b01c8a26a8bbc5cd2e66d816917";
+  };
+  checkPhase = ''
+    rm prompt_toolkit/win32_types.py
+    py.test -k 'not test_pathcompleter_can_expanduser'
+  '';
+
+  checkInputs = [ pytest ];
+  propagatedBuildInputs = [ docopt six wcwidth pygments ];
+
+  meta = {
+    description = "Python library for building powerful interactive command lines";
+    longDescription = ''
+      prompt_toolkit could be a replacement for readline, but it can be
+      much more than that. It is cross-platform, everything that you build
+      with it should run fine on both Unix and Windows systems. Also ships
+      with a nice interactive Python shell (called ptpython) built on top.
+    '';
+    homepage = https://github.com/jonathanslenders/python-prompt-toolkit;
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ nckx ];
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/pycryptodome/default.nix b/pkgs/development/python-modules/pycryptodome/default.nix
index 148225787614..9751eaf7ce79 100644
--- a/pkgs/development/python-modules/pycryptodome/default.nix
+++ b/pkgs/development/python-modules/pycryptodome/default.nix
@@ -1,13 +1,13 @@
 { stdenv, fetchurl, python, buildPythonPackage, gmp }:
 
 buildPythonPackage rec {
-  version = "3.4.6";
+  version = "3.4.7";
   pname = "pycryptodome";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/p/pycryptodome/${name}.tar.gz";
-    sha256 = "df1be662060cf3abdcf2086ebb401f750744106425ddebf74c57feab410e4923";
+    sha256 = "18d8dfe31bf0cb53d58694903e526be68f3cf48e6e3c6dfbbc1e7042b1693af7";
   };
 
   meta = {
diff --git a/pkgs/development/python-modules/pyroute2/default.nix b/pkgs/development/python-modules/pyroute2/default.nix
index 8465c205295c..7a59690e5b04 100644
--- a/pkgs/development/python-modules/pyroute2/default.nix
+++ b/pkgs/development/python-modules/pyroute2/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "pyroute2";
-  version = "0.4.19";
+  version = "0.4.21";
   name = "${pname}-${version}";
 
   src = fetchurl {
     url = "mirror://pypi/p/pyroute2/${name}.tar.gz";
-    sha256 = "122a1e34702287b805742a6edd8fe8483608238bd1602df2d5e3274bd8e8030a";
+    sha256 = "7afad28ee0a0f3e7c34adaa9f953d00560ed9910203e93f107833b6e8d151171";
   };
 
   # requires root priviledges
diff --git a/pkgs/development/python-modules/pyshp/default.nix b/pkgs/development/python-modules/pyshp/default.nix
index 4629331e52d5..ea38c096ee1b 100644
--- a/pkgs/development/python-modules/pyshp/default.nix
+++ b/pkgs/development/python-modules/pyshp/default.nix
@@ -2,13 +2,13 @@
 , setuptools }:
 
 buildPythonPackage rec {
-  version = "1.2.3";
+  version = "1.2.12";
   pname = "pyshp";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "e18cc19659dadc5ddaa891eb780a6958094da0cf105a1efe0f67e75b4fa1cdf9";
+    sha256 = "8dcd65e0aa2aa2951527ddb7339ea6e69023543d8a20a73fc51e2829b9ed6179";
   };
 
   buildInputs = [ setuptools ];
diff --git a/pkgs/development/python-modules/pytest-flake8/default.nix b/pkgs/development/python-modules/pytest-flake8/default.nix
index 93883283627e..b39737ea7019 100644
--- a/pkgs/development/python-modules/pytest-flake8/default.nix
+++ b/pkgs/development/python-modules/pytest-flake8/default.nix
@@ -1,4 +1,4 @@
-{lib, buildPythonPackage, fetchPypi, pytest, flake8}:
+{lib, buildPythonPackage, fetchPypi, fetchpatch, pytest, flake8}:
 
 buildPythonPackage rec {
   name = "${pname}-${version}";
@@ -16,6 +16,16 @@ buildPythonPackage rec {
     sha256 = "1za5i09gz127yraigmcl443w6149714l279rmlfxg1bl2kdsc45a";
   };
 
+  patches = [
+    # Fix pytest strict mode (pull request #24)
+    # https://github.com/tholo/pytest-flake8/pull/24
+    (fetchpatch {
+      name = "fix-compatibility-with-pytest-strict-mode.patch";
+      url = "https://github.com/tholo/pytest-flake8/commit/434e1b07b4b77bfe1ddb9b2b54470c6c3815bb1a.patch";
+      sha256 = "0idwgkwwysx2cibnykd81yxrgqzkpf42j99jmpnanqzi99qnc3wx";
+    })
+  ];
+
   checkPhase = ''
     pytest --ignore=nix_run_setup.py .
   '';
diff --git a/pkgs/development/python-modules/pytest-sugar/default.nix b/pkgs/development/python-modules/pytest-sugar/default.nix
new file mode 100644
index 000000000000..2965d169599a
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-sugar/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, buildPythonPackage, fetchPypi, termcolor, pytest }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "pytest-sugar";
+  version = "0.9.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "11lni9kn0r1y896xg20qjv4yjcyr56h0hx9dprdgjnam4dqcl6lg";
+  };
+
+  propagatedBuildInputs = [ termcolor pytest ];
+
+  meta = with stdenv.lib; {
+    description = "A plugin that changes the default look and feel of py.test";
+    homepage = https://github.com/Frozenball/pytest-sugar;
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/pytest-warnings/default.nix b/pkgs/development/python-modules/pytest-warnings/default.nix
new file mode 100644
index 000000000000..6b835abcafe5
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-warnings/default.nix
@@ -0,0 +1,20 @@
+{ lib, buildPythonPackage, fetchPypi, pytest }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "pytest-warnings";
+  version = "0.3.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "18yxh153icmndaw8fkl1va0bk0mwzrbpaa6wxd29w3iwxym5zn2a";
+  };
+
+  propagatedBuildInputs = [ pytest ];
+
+  meta = {
+    description = "Plugin to list Python warnings in pytest report";
+    homepage = github.com/fschulze/pytest-warnings;
+    license = lib.licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/pytimeparse/default.nix b/pkgs/development/python-modules/pytimeparse/default.nix
index ce5ff0586649..374263c2b70e 100644
--- a/pkgs/development/python-modules/pytimeparse/default.nix
+++ b/pkgs/development/python-modules/pytimeparse/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
     pname = "pytimeparse";
-    version = "1.1.6";
+    version = "1.1.7";
     name = "${pname}-${version}";
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "0imbb68i5n5fm704gv47if1blpxd4f8g16qmp5ar07cavgh2mibl";
+      sha256 = "51b641bcd435e0cb6b9701ed79cf7ee97fa6bf2dbb5d41baa16e5486e5d9b17a";
     };
 
     propagatedBuildInputs = [ nose ];
diff --git a/pkgs/development/python-modules/requests/default.nix b/pkgs/development/python-modules/requests/default.nix
new file mode 100644
index 000000000000..b85bb54a4f15
--- /dev/null
+++ b/pkgs/development/python-modules/requests/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchPypi, buildPythonPackage
+, urllib3, idna, chardet, certifi
+, pytest }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "requests";
+  version = "2.18.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0zi3v9nsmv9j27d0c0m1dvqyvaxz53g8m0aa1h3qanxs4irkwi4w";
+  };
+
+  nativeBuildInputs = [ pytest ];
+  propagatedBuildInputs = [ urllib3 idna chardet certifi ];
+  # sadly, tests require networking
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "An Apache2 licensed HTTP library, written in Python, for human beings";
+    homepage = http://docs.python-requests.org/en/latest/;
+    license = licenses.asl20;
+  };
+}
diff --git a/pkgs/development/python-modules/restructuredtext_lint/default.nix b/pkgs/development/python-modules/restructuredtext_lint/default.nix
new file mode 100644
index 000000000000..1a863c629738
--- /dev/null
+++ b/pkgs/development/python-modules/restructuredtext_lint/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, docutils
+, nose
+, stdenv
+, flake8
+, pyyaml
+, testtools
+}:
+
+buildPythonPackage rec {
+  pname = "restructuredtext_lint";
+  version = "1.1.1";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "167e8adaa5bdc30531ee91760d6c216b306a8a3372aad34b1f72d8adcc5e011e";
+  };
+
+  checkInputs = [ nose flake8 pyyaml testtools ];
+  propagatedBuildInputs = [ docutils ];
+
+  checkPhase = ''
+     ${stdenv.shell} test.sh
+  '';
+
+  meta = {
+    description = "reStructuredText linter";
+    homepage = https://github.com/twolfson/restructuredtext-lint;
+    license = lib.licenses.unlicense;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/semver/default.nix b/pkgs/development/python-modules/semver/default.nix
index 2d592962558c..f2f3069fbf9f 100644
--- a/pkgs/development/python-modules/semver/default.nix
+++ b/pkgs/development/python-modules/semver/default.nix
@@ -3,11 +3,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "semver";
-  version = "2.7.7";
+  version = "2.7.8";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "20ffbb50248a6141bb9eba907db0e47ee4a239ddb55fe0ada8696fc241495a9d";
+    sha256 = "a6212f5c552452e306502ac8476bbca48af62db29c4528fdd91d319d0a44b07b";
   };
 
   # No tests in archive
diff --git a/pkgs/development/python-modules/service_identity/default.nix b/pkgs/development/python-modules/service_identity/default.nix
new file mode 100644
index 000000000000..d27c4fe2975c
--- /dev/null
+++ b/pkgs/development/python-modules/service_identity/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, characteristic
+, pyasn1
+, pyasn1-modules
+, pyopenssl
+, idna
+, attrs
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "service_identity";
+  version = "17.0.0";
+  name = "${pname}-${version}";
+
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "4001fbb3da19e0df22c47a06d29681a398473af4aa9d745eca525b3b2c2302ab";
+  };
+
+  propagatedBuildInputs = [
+    characteristic pyasn1 pyasn1-modules pyopenssl idna attrs
+  ];
+
+  checkInputs = [
+    pytest
+  ];
+
+  checkPhase = ''
+    py.test
+  '';
+
+  # Tests not included in archive
+  doCheck = false;
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/sphinx-testing/default.nix b/pkgs/development/python-modules/sphinx-testing/default.nix
new file mode 100644
index 000000000000..2efb23c80864
--- /dev/null
+++ b/pkgs/development/python-modules/sphinx-testing/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, mock
+, sphinx
+, six
+, python
+}:
+
+buildPythonPackage rec {
+  pname = "sphinx-testing";
+  version = "0.7.2";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "9d30f93007620e137b33edf19f52a7225eab853546b7e588ef09d1342e821e94";
+  };
+
+  checkInputs = [ mock ];
+  propagatedBuildInputs = [ sphinx six ];
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest discover -s tests
+  '';
+
+  # Test failures https://github.com/sphinx-doc/sphinx-testing/issues/5
+  doCheck = false;
+
+  meta = {
+    homepage = https://github.com/sphinx-doc/sphinx-testing;
+    license = lib.licenses.bsd2;
+    description = "Testing utility classes and functions for Sphinx extensions";
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/sqlalchemy-migrate/default.nix b/pkgs/development/python-modules/sqlalchemy-migrate/default.nix
index 9cf1ba1b3d87..9b431f29acb8 100644
--- a/pkgs/development/python-modules/sqlalchemy-migrate/default.nix
+++ b/pkgs/development/python-modules/sqlalchemy-migrate/default.nix
@@ -12,7 +12,7 @@ buildPythonPackage rec {
     sha256 = "0ld2bihp9kmf57ykgzrfgxs4j9kxlw79sgdj9sfn47snw3izb2p6";
   };
 
-  buildInputs = [ unittest2 scripttest pytz pylint tempest-lib mock testtools ];
+  checkInputs = [ unittest2 scripttest pytz pylint  mock testtools ];
   propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ];
 
   checkPhase = ''
@@ -27,6 +27,9 @@ buildPythonPackage rec {
     ${python.interpreter} setup.py test
   '';
 
+  # Tests require tempest-lib which requires the broken oslo-config
+  doCheck = false;
+
   meta = with stdenv.lib; {
     homepage = http://code.google.com/p/sqlalchemy-migrate/;
     description = "Schema migration tools for SQLAlchemy";
diff --git a/pkgs/development/python-modules/sqlmap/default.nix b/pkgs/development/python-modules/sqlmap/default.nix
index a440abb51498..b976524ba698 100644
--- a/pkgs/development/python-modules/sqlmap/default.nix
+++ b/pkgs/development/python-modules/sqlmap/default.nix
@@ -5,12 +5,12 @@
 
 buildPythonPackage rec {
   pname = "sqlmap";
-  version = "1.1.8";
+  version = "1.1.9";
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "f8f88fc7fe0ba81a7558902f87df31c052e27404caa26a160174747afcaebe49";
+    sha256 = "3387ba58383f4e8131f109b40e2b001dec436f38cd9b9b78d38871b8608fdd9e";
   };
 
   # No tests in archive
diff --git a/pkgs/development/python-modules/tempora/default.nix b/pkgs/development/python-modules/tempora/default.nix
index 69006a319055..a8eba4cb3a0c 100644
--- a/pkgs/development/python-modules/tempora/default.nix
+++ b/pkgs/development/python-modules/tempora/default.nix
@@ -1,19 +1,20 @@
 { stdenv, buildPythonPackage, fetchPypi
-, setuptools_scm, six }:
+, setuptools_scm
+, six, pytz}:
 
 buildPythonPackage rec {
-  version = "1.4";
-  pname = "tempora";
   name = "${pname}-${version}";
+  pname = "tempora";
+  version = "1.8";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0ysvns22i5hzhl5ln4n86bq10j8xwvd09z8qw1zjr3s0fj3lynza";
+    sha256 = "1b29d19r8h5my9kzzywi9khn1qzvk3qzp08k0f4rrsa7qks930l4";
   };
 
   doCheck = false;
 
   buildInputs = [ setuptools_scm ];
 
-  propagatedBuildInputs = [ six ];
+  propagatedBuildInputs = [ six pytz ];
 }
diff --git a/pkgs/development/python-modules/testtools/default.nix b/pkgs/development/python-modules/testtools/default.nix
new file mode 100644
index 000000000000..d1f3a5feeaaa
--- /dev/null
+++ b/pkgs/development/python-modules/testtools/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pbr
+, python_mimeparse
+, extras
+, lxml
+, unittest2
+, traceback2
+, isPy3k
+}:
+
+buildPythonPackage rec {
+  pname = "testtools";
+  version = "1.8.0";
+  name = "${pname}-${version}";
+
+  # Python 2 only judging from SyntaxError
+#   disabled = isPy3k;
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "15yxz8d70iy1b1x6gd7spvblq0mjxjardl4vnaqasxafzc069zca";
+  };
+
+  propagatedBuildInputs = [ pbr python_mimeparse extras lxml unittest2 ];
+  buildInputs = [ traceback2 ];
+  patches = [ ./testtools_support_unittest2.patch ];
+
+  # No tests in archive
+  doCheck = false;
+
+  meta = {
+    description = "A set of extensions to the Python standard library's unit testing framework";
+    homepage = http://pypi.python.org/pypi/testtools;
+    license = lib.licenses.mit;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/development/python-modules/testtools_support_unittest2.patch b/pkgs/development/python-modules/testtools/testtools_support_unittest2.patch
index 545e5f01ec09..545e5f01ec09 100644
--- a/pkgs/development/python-modules/testtools_support_unittest2.patch
+++ b/pkgs/development/python-modules/testtools/testtools_support_unittest2.patch
diff --git a/pkgs/development/python-modules/tornado/default.nix b/pkgs/development/python-modules/tornado/default.nix
index 11078eb85623..bc39745945d9 100644
--- a/pkgs/development/python-modules/tornado/default.nix
+++ b/pkgs/development/python-modules/tornado/default.nix
@@ -10,7 +10,7 @@
 
 buildPythonPackage rec {
   pname = "tornado";
-  version = "4.5.1";
+  version = "4.5.2";
   name = "${pname}-${version}";
 
   propagatedBuildInputs = [ backports_abc backports_ssl_match_hostname certifi singledispatch ];
@@ -23,6 +23,6 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "db0904a28253cfe53e7dedc765c71596f3c53bb8a866ae50123320ec1a7b73fd";
+    sha256 = "1fb8e494cd46c674d86fac5885a3ff87b0e283937a47d74eb3c02a48c9e89ad0";
   };
 }
diff --git a/pkgs/development/python-modules/treq/default.nix b/pkgs/development/python-modules/treq/default.nix
index 5ee984941d07..6bd7355b34df 100644
--- a/pkgs/development/python-modules/treq/default.nix
+++ b/pkgs/development/python-modules/treq/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchPypi, buildPythonPackage, service-identity, requests, six
-, mock, twisted, incremental, pep8 }:
+, mock, twisted, incremental, pep8, httpbin
+}:
 
 buildPythonPackage rec {
   name = "${pname}-${version}";
@@ -11,11 +12,20 @@ buildPythonPackage rec {
     sha256 = "ef72d2d5e0b24bdf29267b608fa33df0ac401743af8524438b073e1fb2b66f16";
   };
 
-  propagatedBuildInputs = [ twisted requests six incremental service-identity ];
+  propagatedBuildInputs = [
+    requests
+    six
+    incremental
+    service-identity
+    twisted
+    # twisted [tls] requirements (we should find a way to list "extras")
+    twisted.extras.tls
+  ];
 
   checkInputs = [
     pep8
     mock
+    httpbin
   ];
 
   postPatch = ''
@@ -35,6 +45,9 @@ buildPythonPackage rec {
     trial treq
   '';
 
+  # Failing tests https://github.com/twisted/treq/issues/208
+  doCheck = false;
+
   meta = with stdenv.lib; {
     homepage = http://github.com/twisted/treq;
     description = "A requests-like API built on top of twisted.web's Agent";
diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix
index 66a6022802fb..8acbfc91a41b 100644
--- a/pkgs/development/python-modules/twisted/default.nix
+++ b/pkgs/development/python-modules/twisted/default.nix
@@ -1,5 +1,15 @@
-{ stdenv, buildPythonPackage, fetchurl, python,
-  zope_interface, incremental, automat, constantly, hyperlink
+{ stdenv
+, buildPythonPackage
+, fetchurl
+, python
+, zope_interface
+, incremental
+, automat
+, constantly
+, hyperlink
+, pyopenssl
+, service-identity
+, idna
 }:
 buildPythonPackage rec {
   pname = "Twisted";
@@ -13,6 +23,8 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [ zope_interface incremental automat constantly hyperlink ];
 
+  passthru.extras.tls = [ pyopenssl service-identity idna ];
+
   # Patch t.p._inotify to point to libc. Without this,
   # twisted.python.runtime.platform.supportsINotify() == False
   patchPhase = stdenv.lib.optionalString stdenv.isLinux ''
diff --git a/pkgs/development/python-modules/txtorcon/default.nix b/pkgs/development/python-modules/txtorcon/default.nix
new file mode 100644
index 000000000000..60947bc769c7
--- /dev/null
+++ b/pkgs/development/python-modules/txtorcon/default.nix
@@ -0,0 +1,39 @@
+{lib, buildPythonPackage, fetchPypi, isPy3k, incremental, ipaddress, twisted
+, automat, zope_interface, idna, pyopenssl, service-identity, pytest, mock, lsof
+, GeoIP}:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "txtorcon";
+  version = "0.19.3";
+
+  checkInputs = [ pytest mock lsof GeoIP ];
+  propagatedBuildInputs = [
+    incremental twisted automat zope_interface
+    # extra dependencies required by twisted[tls]
+    idna pyopenssl service-identity
+  ] ++ lib.optionals (!isPy3k) [ ipaddress ];
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1za4qag4g2lbw695v4ssxqc2aspdyknnbn2diylwg8q9g5k9cczp";
+  };
+
+  # ipaddress isn't required for Python 3 although it's in requirements.txt.
+  # Because ipaddress doesn't install on Python 3, remove the requirement so the
+  # installation of this package doesn't fail on Python 3.
+  postPatch = "" + lib.optionalString isPy3k ''
+    substituteInPlace requirements.txt --replace "ipaddress>=1.0.16" ""
+  '';
+
+  checkPhase = ''
+    pytest .
+  '';
+
+  meta = {
+    description = "Twisted-based Tor controller client, with state-tracking and configuration abstractions";
+    homepage = https://github.com/meejah/txtorcon;
+    maintainers = with lib.maintainers; [ jluttine ];
+    license = lib.licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/tzlocal/default.nix b/pkgs/development/python-modules/tzlocal/default.nix
new file mode 100644
index 000000000000..2277cb7c4ca4
--- /dev/null
+++ b/pkgs/development/python-modules/tzlocal/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, tzlocal, pytz }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "tzlocal";
+  version = "1.4";
+
+  propagatedBuildInputs = [ pytz ];
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0n9hw4kqblyc0avzwi26rqmvyk9impb608rvy11qifmigy7r18h5";
+  };
+
+  # test fail (timezone test fail)
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Tzinfo object for the local timezone";
+    homepage = https://github.com/regebro/tzlocal;
+    license = licenses.cddl;
+  };
+}
diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix
new file mode 100644
index 000000000000..a23ae0f0b74e
--- /dev/null
+++ b/pkgs/development/python-modules/urllib3/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, coverage, tornado, mock, nose, psutil, pysocks }:
+
+buildPythonPackage rec {
+  pname = "urllib3";
+  version = "1.22";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0kyvc9zdlxr5r96bng5rhm9a6sfqidrbvvkz64s76qs5267dli6c";
+  };
+
+  NOSE_EXCLUDE = stdenv.lib.concatStringsSep "," [
+    "test_headers" "test_headerdict" "test_can_validate_ip_san" "test_delayed_body_read_timeout"
+    "test_timeout_errors_cause_retries" "test_select_multiple_interrupts_with_event"
+  ];
+
+  checkPhase = ''
+    nosetests -v --cover-min-percentage 1
+  '';
+
+  doCheck = false;
+
+  buildInputs = [ coverage tornado mock nose psutil pysocks ];
+
+  meta = with stdenv.lib; {
+    description = "A Python library for Dropbox's HTTP-based Core and Datastore APIs";
+    homepage = https://www.dropbox.com/developers/core/docs;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/vcversioner/default.nix b/pkgs/development/python-modules/vcversioner/default.nix
new file mode 100644
index 000000000000..1b9819c035db
--- /dev/null
+++ b/pkgs/development/python-modules/vcversioner/default.nix
@@ -0,0 +1,18 @@
+{ stdenv, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "vcversioner";
+  version = "2.16.0.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns";
+  };
+
+  meta = with stdenv.lib; {
+    description = "take version numbers from version control";
+    homepage = https://github.com/habnabit/vcversioner;
+    licenses = licenses.isc;
+  };
+}
diff --git a/pkgs/development/python-modules/werkzeug/default.nix b/pkgs/development/python-modules/werkzeug/default.nix
new file mode 100644
index 000000000000..5979d895a747
--- /dev/null
+++ b/pkgs/development/python-modules/werkzeug/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, itsdangerous
+, pytest, requests, glibcLocales }:
+
+buildPythonPackage rec {
+  name = "${pname}-${version}";
+  pname = "Werkzeug";
+  version = "0.12.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "09mv4cya3lywkn4mi3qrqmjgwiw99kdk03dk912j8da6ny3pnflh";
+  };
+
+  LC_ALL = "en_US.UTF-8";
+
+  propagatedBuildInputs = [ itsdangerous ];
+  buildInputs = [ pytest requests glibcLocales ];
+
+  meta = with stdenv.lib; {
+    homepage = http://werkzeug.pocoo.org/;
+    description = "A WSGI utility library for Python";
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/zetup/default.nix b/pkgs/development/python-modules/zetup/default.nix
index 66a4718fe9e7..a682a6e4e928 100644
--- a/pkgs/development/python-modules/zetup/default.nix
+++ b/pkgs/development/python-modules/zetup/default.nix
@@ -5,11 +5,11 @@
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "zetup";
-  version = "0.2.34";
+  version = "0.2.42";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0k4lm51b5qjy7yxy3n5z8vc5hlvjcsfsvwjgqzkr0pisysar1kpf";
+    sha256 = "6c9e25249f3014ed2162398772ccf1a5e8a4e9e66c74e3c7f6683945a6a3d84c";
   };
 
   checkPhase = ''
diff --git a/pkgs/development/python-modules/zxcvbn-python/default.nix b/pkgs/development/python-modules/zxcvbn-python/default.nix
index 66a0f8d77aab..49ff6e505f41 100644
--- a/pkgs/development/python-modules/zxcvbn-python/default.nix
+++ b/pkgs/development/python-modules/zxcvbn-python/default.nix
@@ -5,13 +5,13 @@
 
 buildPythonPackage rec {
   pname = "zxcvbn-python";
-  version = "4.4.15";
+  version = "4.4.16";
 
   name = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "ef982a382518d217d353a42093aa8bb8608a50bc2df559c08885bba166782cd0";
+    sha256 = "63cc481bfb8950c43d4a87926be22cf8c4bb281ef7f818a8ef2d30b55a97c3e0";
   };
 
   # No tests in archive
diff --git a/pkgs/tools/admin/ansible/2.1.nix b/pkgs/tools/admin/ansible/2.1.nix
index 5a20b5256076..6232e4ad95ba 100644
--- a/pkgs/tools/admin/ansible/2.1.nix
+++ b/pkgs/tools/admin/ansible/2.1.nix
@@ -7,16 +7,14 @@
 with pythonPackages;
 
 let
-  jinja = jinja2.override rec {
-    pname = "Jinja2";
+  jinja = jinja2.overridePythonAttrs (old: rec {
     version = "2.8.1";
-    name = "${pname}-${version}";
-    src = fetchurl {
-      url = "mirror://pypi/J/Jinja2/${name}.tar.gz";
+    name = "${old.pname}-${version}";
+    src = old.src.override {
+      inherit version;
       sha256 = "35341f3a97b46327b3ef1eb624aadea87a535b8f50863036e085e7c426ac5891";
     };
-  };
-
+  });
 in buildPythonPackage rec {
   pname = "ansible";
   version = "2.1.4.0";
diff --git a/pkgs/tools/admin/ansible/2.2.nix b/pkgs/tools/admin/ansible/2.2.nix
index 528dbf0e97bc..02392d7ac89f 100644
--- a/pkgs/tools/admin/ansible/2.2.nix
+++ b/pkgs/tools/admin/ansible/2.2.nix
@@ -9,12 +9,11 @@ with pythonPackages;
 let
   # Shouldn't be needed anymore in next version
   # https://github.com/NixOS/nixpkgs/pull/22345#commitcomment-20718521
-  jinja = (jinja2.override rec {
-    pname = "Jinja2";
+  jinja = jinja2.overridePythonAttrs (old: rec {
     version = "2.8.1";
-    name = "${pname}-${version}";
-    src = fetchurl {
-      url = "mirror://pypi/J/Jinja2/${name}.tar.gz";
+    name = "${old.pname}-${version}";
+    src = old.src.override {
+      inherit version;
       sha256 = "35341f3a97b46327b3ef1eb624aadea87a535b8f50863036e085e7c426ac5891";
     };
   });
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 14bb5158a2dd..2c811c057779 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -315,38 +315,7 @@ in {
 
   aiofiles = callPackage ../development/python-modules/aiofiles { };
 
-  aiohttp =
-  let yarl_0_9_8 = self.yarl.overrideAttrs (old: rec {
-    pname = "yarl";
-    version = "0.9.8";
-    name = "${pname}-${version}";
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
-      sha256 = "1v2dsmr7bqp0yx51pwhbxyvzza8m2f88prsnbd926mi6ah38p0d7";
-    };
-  });
-  in buildPythonPackage rec {
-    name = "aiohttp-${version}";
-    version = "1.3.5";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/a/aiohttp/${name}.tar.gz";
-      sha256 = "0hpqdiaifgyfqmxkyzwypwvrnvz5rqzgzylzhihfidc5ldfs856d";
-    };
-
-    disabled = pythonOlder "3.4";
-
-    doCheck = false; # Too many tests fail.
-
-    buildInputs = with self; [ pytest gunicorn pytest-raisesregexp ];
-    propagatedBuildInputs = with self; [ async-timeout chardet multidict yarl_0_9_8 ];
-
-    meta = {
-      description = "Http client/server for asyncio";
-      license = with licenses; [ asl20 ];
-      homepage = https://github.com/KeepSafe/aiohttp/;
-    };
-  };
+  aiohttp = callPackage ../development/python-modules/aiohttp { };
 
   aiohttp-cors = buildPythonPackage rec {
     name = "${pname}-${version}";
@@ -682,29 +651,7 @@ in {
     };
   });
 
-  attrs = buildPythonPackage (rec {
-    name = "attrs-${version}";
-    version = "16.2.0";
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/a/attrs/${name}.tar.gz";
-      sha256 = "136f2ec0f94ec77ff2990830feee965d608cab1e8922370e3abdded383d52001";
-    };
-
-    # macOS needs clang for testing
-    buildInputs = with self; [ pytest hypothesis zope_interface
-    pympler coverage ]
-     ++ optionals (stdenv.isDarwin) [ pkgs.clang ];
-
-    checkPhase = ''
-      py.test
-    '';
-
-    meta = {
-      description = "Python attributes without boilerplate";
-      homepage = https://github.com/hynek/attrs;
-      license = licenses.mit;
-    };
-   });
+  attrs = callPackage ../development/python-modules/attrs { };
 
   audioread = callPackage ../development/python-modules/audioread { };
 
@@ -1263,6 +1210,8 @@ in {
     };
   };
 
+  backports_unittest-mock = callPackage ../development/python-modules/backports_unittest-mock {};
+
   babelfish = buildPythonPackage rec {
     version = "0.5.5";
     name = "babelfish-${version}";
@@ -1361,26 +1310,7 @@ in {
     };
   });
 
-  beautifulsoup4 = buildPythonPackage (rec {
-    name = "beautifulsoup4-4.5.3";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/b/beautifulsoup4/${name}.tar.gz";
-      sha256 = "0glaw1vyxnbp03fni7h5496n6iib0n5iim4gax1n0ngscs9s075j";
-    };
-
-    buildInputs = [ self.nose ];
-    checkPhase = ''
-      nosetests build/
-    '';
-
-    meta = {
-      homepage = http://crummy.com/software/BeautifulSoup/bs4/;
-      description = "HTML and XML parser";
-      license = licenses.mit;
-      maintainers = with maintainers; [ domenkozar ];
-    };
-  });
+  beautifulsoup4 = callPackage ../development/python-modules/beautifulsoup4 { };
 
   beaker = buildPythonPackage rec {
     name = "Beaker-${version}";
@@ -1661,6 +1591,8 @@ in {
 
   channels = callPackage ../development/python-modules/channels {};
 
+  cheroot = callPackage ../development/python-modules/cheroot {};
+
   circus = buildPythonPackage rec {
     name = "circus-0.11.1";
 
@@ -2178,54 +2110,9 @@ in {
     };
   };
 
-  bokeh = buildPythonPackage rec {
-    name = "bokeh-${version}";
-    version = "0.12.3";
+  bkcharts = callPackage ../development/python-modules/bkcharts { };
 
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/b/bokeh/${name}.tar.gz";
-      sha256 = "e138941b62f59bc48bc5b8d249e90c03fed31c1d5abe47ab2ce9e4c83202f73c";
-    };
-
-    disabled = isPyPy;
-
-    # Some test that uses tornado fails
-    doCheck = false;
-
-    buildInputs = with self; [ mock pytest ];
-
-    propagatedBuildInputs = with self; [
-      flask
-      jinja2
-      markupsafe
-      werkzeug
-      itsdangerous
-      dateutil
-      requests
-      six
-      pygments
-      pystache
-      markdown
-      pyyaml
-      pyzmq
-      tornado
-      colorama
-      ]
-      ++ optionals ( !isPy3k ) [ futures ]
-      ++ optionals ( isPy26 ) [ argparse ]
-      ++ optionals ( !isPy3k && !isPyPy ) [ websocket_client ]
-      ++ optionals ( !isPyPy ) [ numpy pandas greenlet ];
-
-    checkPhase = ''
-      ${python.interpreter} -m unittest discover -s bokeh/tests
-    '';
-
-    meta = {
-      description = "Statistical and novel interactive HTML plots for Python";
-      homepage = "http://github.com/bokeh/bokeh";
-      license = licenses.bsd3;
-    };
-  };
+  bokeh = callPackage ../development/python-modules/bokeh { };
 
   boto = buildPythonPackage rec {
     name = "boto-${version}";
@@ -2793,27 +2680,7 @@ in {
     };
   };
 
-
-  cherrypy = buildPythonPackage (rec {
-    name = "cherrypy-${version}";
-    version = "8.7.0";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/C/CherryPy/CherryPy-${version}.tar.gz";
-      sha256 = "cbf418bf46458a67eb841944f2d414c23bf59d090baf2a28704bd67243e6a79f";
-    };
-
-    # wsgiserver.ssl_pyopenssl is broken on py3k.
-    doCheck = !isPy3k;
-    buildInputs = with self; [ pytest setuptools_scm pytestrunner ];
-    propagatedBuildInputs = with self; [ six ];
-
-    meta = {
-      homepage = "http://www.cherrypy.org";
-      description = "A pythonic, object-oriented HTTP framework";
-    };
-  });
-
+  cherrypy = callPackage ../development/python-modules/cherrypy {};
 
   cjson = buildPythonPackage rec {
     name = "python-cjson-${version}";
@@ -3319,15 +3186,7 @@ in {
   };
 
 
-  contextlib2 = buildPythonPackage rec {
-    name = "contextlib2-${version}";
-    version = "0.5.3";
-
-    src = pkgs.fetchurl rec {
-      url = "mirror://pypi/c/contextlib2/${name}.tar.gz";
-      sha256 = "01k2921labkbn28kw60jmqzvr4nxzfnx4vcsyjb3rir177qh1r9h";
-    };
-  };
+  contextlib2 = callPackage ../development/python-modules/contextlib2 { };
 
   cookiecutter = buildPythonPackage rec {
     version = "1.4.0";
@@ -3372,24 +3231,7 @@ in {
 
   coveralls = callPackage ../development/python-modules/coveralls { };
 
-  coverage = buildPythonPackage rec {
-    name = "coverage-4.0.1";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/c/coverage/${name}.tar.gz";
-      sha256 = "0nrd817pzjw1haaz6gambgwf4jdjnh9kyxkgj6l8qgl6hdxga45w";
-    };
-
-    # TypeError: __call__() takes 1 positional argument but 2 were given
-    doCheck = !isPy3k;
-    buildInputs = with self; [ mock ];
-
-    meta = {
-      description = "Code coverage measurement for python";
-      homepage = http://nedbatchelder.com/code/coverage/;
-      license = licenses.bsd3;
-    };
-  };
+  coverage = callPackage ../development/python-modules/coverage { };
 
   covCore = buildPythonPackage rec {
     name = "cov-core-1.15.0";
@@ -3490,12 +3332,12 @@ in {
   cryptography = buildPythonPackage rec {
     # also bump cryptography_vectors
     pname = "cryptography";
-    name = "${pname}${version}";
-    version = "1.8.1";
+    name = "${pname}-${version}";
+    version = "2.0.3";
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "323524312bb467565ebca7e50c8ae5e9674e544951d28a2904a50012a8828190";
+      sha256 = "d04bb2425086c3fe86f7bc48915290b13e798497839fbb18ab7f6dffcf98cc3a";
     };
 
     buildInputs = [ pkgs.openssl self.cryptography_vectors ]
@@ -3533,12 +3375,12 @@ in {
   cryptography_vectors = buildPythonPackage rec {
       # also bump cryptography
     pname = "cryptography_vectors";
-    name = "${pname}${version}";
-    version = "1.8.1";
+    version = self.cryptography.version;
+    name = "${pname}-${version}";
 
     src = fetchPypi {
       inherit pname version;
-      sha256 = "2fd61facea08800ca98ac923f6d02f48a7ae6648025b29cdeb51987c1532add6";
+      sha256 = "beb831aa73663a224f4d7520483ed02da544533bb03b26ec07a5f9a0dd0941e1";
     };
 
     # No tests included
@@ -4275,6 +4117,8 @@ in {
     };
   };
 
+  pytest-warnings = callPackage ../development/python-modules/pytest-warnings { };
+
   pytestpep8 = buildPythonPackage rec {
     name = "pytest-pep8";
     src = pkgs.fetchurl {
@@ -4485,6 +4329,8 @@ in {
     };
   };
 
+  pytest-sugar = callPackage ../development/python-modules/pytest-sugar { };
+
   tinycss = buildPythonPackage rec {
     name = "tinycss-${version}";
     version = "0.3";
@@ -5108,24 +4954,7 @@ in {
   };
 
 
-  dill = buildPythonPackage rec {
-    name = "dill-${version}";
-    version = "0.2.6";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/d/dill/${name}.zip";
-      sha256 = "6c1ccca68be483fa8c66e85a89ffc850206c26373aa77a97b83d8d0994e7f1fd";
-    };
-
-    # TypeError: don't know how to make test from: {'byref': False, 'recurse': False, 'protocol': 3, 'fmode': 0}
-    doCheck = false;
-
-    meta = {
-      description = "Serialize all of python (almost)";
-      homepage = http://www.cacr.caltech.edu/~mmckerns/dill.htm;
-      license = licenses.bsd3;
-    };
-  };
+  dill = callPackage ../development/python-modules/dill { };
 
   discogs_client = buildPythonPackage rec {
     name = "discogs-client-2.0.2";
@@ -5355,38 +5184,7 @@ in {
     };
   };
 
-  urllib3 = let
-    disabled_tests = [
-      "test_headers" "test_headerdict" "test_can_validate_ip_san" "test_delayed_body_read_timeout"
-      "test_timeout_errors_cause_retries" "test_select_multiple_interrupts_with_event"
-    ];
-  in buildPythonPackage rec {
-    pname = "urllib3";
-    version = "1.20";
-    name = "${pname}-${version}";
-
-    src = fetchPypi {
-      inherit pname version;
-      sha256 = "0bx76if7shzlyykmaj4fhjkir5bswc4fdx5r4q0lrn3q51p2pvwp";
-    };
-
-    NOSE_EXCLUDE=concatStringsSep "," disabled_tests;
-
-    checkPhase = ''
-      nosetests -v --cover-min-percentage 1
-    '';
-
-    doCheck = false;
-
-    buildInputs = with self; [ coverage tornado mock nose psutil pysocks ];
-
-    meta = {
-      description = "A Python library for Dropbox's HTTP-based Core and Datastore APIs";
-      homepage = https://www.dropbox.com/developers/core/docs;
-      license = licenses.mit;
-    };
-  };
-
+  urllib3 = callPackage ../development/python-modules/urllib3 {};
 
   dropbox = buildPythonPackage rec {
     name = "dropbox-${version}";
@@ -5540,19 +5338,7 @@ in {
     };
   });
 
-  entrypoints = buildPythonPackage rec {
-    pname = "entrypoints";
-    version = "0.2.2";
-    name = "${pname}-${version}";
-    format = "wheel";
-
-    src = fetchPypi {
-      inherit pname version format;
-      sha256 = "0a0685962ee5ac303f470acbb659f0f97aef5b9deb6b85d059691c706ef6e45e";
-    };
-
-    propagatedBuildInputs = with self; [ configparser ];
-  };
+  entrypoints = callPackage ../development/python-modules/entrypoints { };
 
   enzyme = callPackage ../development/python-modules/enzyme {};
 
@@ -5867,28 +5653,7 @@ in {
     propagatedBuildInputs = with self; [ rpkg offtrac urlgrabber fedora_cert ];
   });
 
-  flit = buildPythonPackage rec {
-    pname = "flit";
-    version = "0.10";
-    name = "${pname}-${version}";
-
-    format = "wheel";
-
-    src = pkgs.fetchurl {
-      url = https://files.pythonhosted.org/packages/24/98/50a090112a04d9e29155c31a222637668b0a4dd778fefcd3132adc50e877/flit-0.10-py3-none-any.whl;
-      sha256 = "4566b2e1807abeb1fd7bfaa9b444447556f1720518edfb134b56a6a1272b0428";
-    };
-
-    disabled = !isPy3k;
-    propagatedBuildInputs = with self; [ docutils requests requests_download zipfile36];
-
-    meta = {
-      description = "A simple packaging tool for simple packages";
-      homepage = https://github.com/takluyver/flit;
-      license = licenses.bsd3;
-      maintainer = maintainers.fridh;
-    };
-  };
+  flit = callPackage ../development/python-modules/flit { };
 
   Flootty = buildPythonPackage rec {
     name = "Flootty-3.2.0";
@@ -6096,6 +5861,8 @@ in {
     };
   };
 
+  GeoIP = callPackage ../development/python-modules/GeoIP { };
+
   gmpy = buildPythonPackage rec {
     name = "gmpy-1.17";
     disabled = isPyPy;
@@ -8755,21 +8522,7 @@ in {
     };
   };
 
-  chardet = buildPythonPackage rec {
-    name = "chardet-2.3.0";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/c/chardet/${name}.tar.gz";
-      sha256 = "e53e38b3a4afe6d1132de62b7400a4ac363452dc5dfcf8d88e8e0cce663c68aa";
-    };
-
-    meta = {
-      homepage = https://github.com/chardet/chardet;
-      description = "Universal encoding detector";
-      license = licenses.lgpl2;
-      maintainers = with maintainers; [ domenkozar ];
-    };
-  };
+  chardet = callPackage ../development/python-modules/chardet { };
 
   django = self.django_1_11;
 
@@ -9640,22 +9393,7 @@ in {
     };
   };
 
-  flask = buildPythonPackage {
-    name = "flask-0.12";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/F/Flask/Flask-0.12.tar.gz";
-      sha256 = "12yasybryp33rdchsqgckf15zj4pjfam7ly5spmn2sijpv6h7s4k";
-    };
-
-    propagatedBuildInputs = with self; [ itsdangerous click werkzeug jinja2 ];
-
-    meta = {
-      homepage = http://flask.pocoo.org/;
-      description = "A microframework based on Werkzeug, Jinja 2, and good intentions";
-      license = licenses.bsd3;
-    };
-  };
+  flask = callPackage ../development/python-modules/flask { };
 
   flask_assets = buildPythonPackage rec {
     name = "Flask-Assets-${version}";
@@ -9693,42 +9431,9 @@ in {
     };
   };
 
-  flask-compress = buildPythonPackage rec {
-    name = "Flask-Compress-${version}";
-    version = "1.3.2";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/F/Flask-Compress/${name}.tar.gz";
-      sha256 = "4fbb53e7f6ce8b1458a2c3d7a528564912f2641ab2f9f43819fc96ed7f770734";
-    };
-
-    propagatedBuildInputs = with self; [ flask ];
-
-    meta = {
-      description = "Compress responses in your Flask app with gzip";
-      homepage = "https://libwilliam.github.io/flask-compress/";
-      license = licenses.mit;
-    };
-  };
-
-  flask-cors = buildPythonPackage rec {
-    name = "Flask-Cors-${version}";
-    version = "2.1.2";
+  flask-compress = callPackage ../development/python-modules/flask-compress { };
 
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/F/Flask-Cors/${name}.tar.gz";
-      sha256 = "0fd618a4f88ykqx4x55viz47cm9rl214q1b45a0b4mz5vhxffqpj";
-    };
-
-    buildInputs = with self; [ nose ];
-    propagatedBuildInputs = with self; [ flask six ];
-
-    meta = {
-      description = "A Flask extension adding a decorator for CORS support";
-      homepage = https://github.com/corydolphin/flask-cors;
-      license = with licenses; [ mit ];
-    };
-  };
+  flask-cors = callPackage ../development/python-modules/flask-cors { };
 
   flask_elastic = callPackage ../development/python-modules/flask-elastic.nix { };
 
@@ -9762,33 +9467,9 @@ in {
 
   flask-pymongo = callPackage ../development/python-modules/Flask-PyMongo { };
 
-  flask-restful = buildPythonPackage rec {
-    name = "Flask-RESTful-${version}";
-    version = "0.3.5";
+  flask-restful = callPackage ../development/python-modules/flask-restful { };
 
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/F/Flask-RESTful/${name}.tar.gz";
-      sha256 = "cce4aeff959b571136b5af098bebe7d3deeca7eb1411c4e722ff2c5356ab4c42";
-    };
-
-    # TypeError: Only byte strings can be passed to C code
-    patchPhase = if isPy3k then ''
-      rm tests/test_crypto.py tests/test_paging.py
-    '' else null;
-    buildInputs = with self; [ nose mock blinker ];
-    propagatedBuildInputs = with self; [ flask six pytz aniso8601 pycrypto ];
-    PYTHON_EGG_CACHE = "`pwd`/.egg-cache";
-
-    meta = {
-      homepage = "http://flask-restful.readthedocs.io/";
-      description = "REST API building blocks for Flask";
-      license = licenses.bsd3;
-    };
-  };
-
-  flask-restplus = callPackage ../development/python-modules/flask-restplus/default.nix { };
-  # Exactly 0.8.6 is required by flexget
-  flask-restplus_0_8 = callPackage ../development/python-modules/flask-restplus/0.8.nix { };
+  flask-restplus = callPackage ../development/python-modules/flask-restplus { };
 
   flask_script = buildPythonPackage rec {
     name = "Flask-Script-${version}";
@@ -9965,47 +9646,9 @@ in {
     };
   };
 
-  jsonschema = buildPythonPackage (rec {
-    version = "2.5.1";
-    name = "jsonschema-${version}";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/j/jsonschema/jsonschema-${version}.tar.gz";
-      sha256 = "0hddbqjm4jq63y8jf44nswina1crjs16l9snb6m3vvgyg31klrrn";
-    };
+  jsonschema = callPackage ../development/python-modules/jsonschema { };
 
-    buildInputs = with self; [ nose mock vcversioner ];
-    propagatedBuildInputs = with self; [ functools32 ];
-
-    patchPhase = ''
-      substituteInPlace jsonschema/tests/test_jsonschema_test_suite.py --replace "python" "${python}/bin/${python.executable}"
-    '';
-
-    checkPhase = ''
-      nosetests
-    '';
-
-    meta = {
-      homepage = https://github.com/Julian/jsonschema;
-      description = "An implementation of JSON Schema validation for Python";
-      license = licenses.mit;
-      maintainers = with maintainers; [ domenkozar ];
-    };
-  });
-
-  vcversioner = buildPythonPackage rec {
-    name = "vcversioner-${version}";
-    version = "2.14.0.0";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/v/vcversioner/vcversioner-${version}.tar.gz";
-      sha256 = "11ivq1bm7v0yb4nsfbv9m7g7lyjn112gbvpjnjz8nv1fx633dm5c";
-    };
-
-    meta = with stdenv.lib; {
-      homepage = "https://github.com/habnabit/vcversioner";
-    };
-  };
+  vcversioner = callPackage ../development/python-modules/vcversioner { };
 
   falcon = buildPythonPackage (rec {
     name = "falcon-1.0.0";
@@ -10750,6 +10393,9 @@ in {
 
   guessit = callPackage ../development/python-modules/guessit { };
 
+  # used by flexget
+  guessit_2_0 = callPackage ../development/python-modules/guessit/2.0.nix { };
+
   rebulk = callPackage ../development/python-modules/rebulk { };
 
   gunicorn = callPackage ../development/python-modules/gunicorn.nix { };
@@ -11449,34 +11095,7 @@ in {
     };
   };
 
-  jinja2 = buildPythonPackage rec {
-    pname = "Jinja2";
-    version = "2.9.5";
-    name = "${pname}-${version}";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/J/Jinja2/${name}.tar.gz";
-      sha256 = "702a24d992f856fa8d5a7a36db6128198d0c21e1da34448ca236c42e92384825";
-    };
-
-    propagatedBuildInputs = with self; [ markupsafe ];
-
-    # No tests included
-    doCheck = false;
-
-    meta = {
-      homepage = http://jinja.pocoo.org/;
-      description = "Stand-alone template engine";
-      license = licenses.bsd3;
-      longDescription = ''
-        Jinja2 is a template engine written in pure Python. It provides a
-        Django inspired non-XML syntax but supports inline expressions and
-        an optional sandboxed environment.
-      '';
-      platforms = platforms.all;
-      maintainers = with maintainers; [ pierron garbas sjourdois ];
-    };
-  };
+  jinja2 = callPackage ../development/python-modules/jinja2 { };
 
   jinja2_time = buildPythonPackage rec {
     version = "0.2.0";
@@ -14484,52 +14103,7 @@ in {
     doCheck = false;
   };
 
-  openpyxl = buildPythonPackage rec {
-    version = "2.3.5";
-    name = "openpyxl-${version}";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/o/openpyxl/${name}.tar.gz";
-      sha256 = "0qj7d8l1qc6cjwk1ps01dyh53b3p2k2k7hwmj98y2257jj5mf1s3";
-    };
-
-    buildInputs = with self; [ pytest ];
-    propagatedBuildInputs = with self; [ jdcal et_xmlfile lxml ];
-
-    # Tests are not included in archive.
-    # https://bitbucket.org/openpyxl/openpyxl/issues/610
-    doCheck = false;
-
-    meta = {
-      description = "A Python library to read/write Excel 2007 xlsx/xlsm files";
-      homepage = https://openpyxl.readthedocs.org;
-      license = licenses.mit;
-      maintainers = with maintainers; [ lihop sjourdois ];
-      platforms = platforms.all;
-    };
-  };
-
-  # optfunc = buildPythonPackage ( rec {
-  #   name = "optfunc-git";
-  #
-  #   src = pkgs.fetchgit {
-  #     url = "https://github.com/simonw/optfunc.git";
-  #     rev = "e3fa034a545ed94ac5a039cf5b170c7d0ee21b7b";
-  #   };
-  #
-  #   installCommand = ''
-  #     dest=$(toPythonPath $out)/optfunc
-  #     mkdir -p $dest
-  #     cp * $dest/
-  #   '';
-  #
-  #   doCheck = false;
-  #
-  #   meta = {
-  #     description = "A new experimental interface to optparse which works by introspecting a function definition";
-  #     homepage = "http://simonwillison.net/2009/May/28/optfunc/";
-  #   };
-  # });
+  openpyxl = callPackage ../development/python-modules/openpyxl { };
 
   ordereddict = buildPythonPackage rec {
     name = "ordereddict-${version}";
@@ -15841,10 +15415,15 @@ in {
       sed -i 's@python@${python.interpreter}@' .testr.conf
     '';
 
-    buildInputs = with self; [ pbr Babel six wrapt testtools testscenarios
-      testrepository subunit coverage oslotest ];
+    buildInputs = with self; [ pbr ];
+    propagatedBuildInputs = with self; [ wrapt Babel six doc8 ];
+    checkInputs = with self; [ pbr Babel six wrapt testtools testscenarios
+       testrepository subunit coverage oslotest ];
+    doCheck = false; # oslo is broken
   };
 
+  doc8 = callPackage ../development/python-modules/doc8 { };
+
   wrapt = buildPythonPackage rec {
     name = "wrapt-${version}";
     version = "1.10.5";
@@ -16751,6 +16330,8 @@ in {
     };
   };
 
+  portend = callPackage ../development/python-modules/portend { };
+
   powerline = callPackage ../development/python-modules/powerline { };
 
   pox = buildPythonPackage rec {
@@ -16837,41 +16418,14 @@ in {
   };
 
 
-  prompt_toolkit = buildPythonPackage rec {
-    name = "prompt_toolkit-${version}";
-    version = "1.0.14";
-
-    src = pkgs.fetchurl {
-      sha256 = "cc66413b1b4b17021675d9f2d15d57e640b06ddfd99bb724c73484126d22622f";
-      url = "mirror://pypi/p/prompt_toolkit/${name}.tar.gz";
-    };
-    checkPhase = ''
-      rm prompt_toolkit/win32_types.py
-      py.test -k 'not test_pathcompleter_can_expanduser'
-    '';
-
-    buildInputs = with self; [ pytest ];
-    propagatedBuildInputs = with self; [ docopt six wcwidth pygments ];
+  prompt_toolkit = callPackage ../development/python-modules/prompt_toolkit { };
 
-    meta = {
-      description = "Python library for building powerful interactive command lines";
-      longDescription = ''
-        prompt_toolkit could be a replacement for readline, but it can be
-        much more than that. It is cross-platform, everything that you build
-        with it should run fine on both Unix and Windows systems. Also ships
-        with a nice interactive Python shell (called ptpython) built on top.
-      '';
-      homepage = https://github.com/jonathanslenders/python-prompt-toolkit;
-      license = licenses.bsd3;
-      maintainers = with maintainers; [ nckx ];
-    };
-  };
-  prompt_toolkit_52 = self.prompt_toolkit.override(self: rec {
-    name = "prompt_toolkit-${version}";
+  prompt_toolkit_52 = self.prompt_toolkit.overridePythonAttrs(oldAttrs: rec {
+    name = "${oldAttrs.pname}-${version}";
     version = "0.52";
-    src = pkgs.fetchurl {
+    src = oldAttrs.src.override {
+      inherit version;
       sha256 = "00h9ldqmb33nhg2kpks7paldf3n3023ipp124alwp96yz16s7f1m";
-      url = "mirror://pypi/p/prompt_toolkit/${name}.tar.gz";
     };
 
     # No tests included in archive
@@ -19083,18 +18637,19 @@ in {
     };
   };
 
-
   pytz = buildPythonPackage rec {
-    name = "pytz-${version}";
-    version = "2016.6.1";
+    name = "${pname}-${version}";
+    pname = "pytz";
+    version = "2017.2";
 
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/p/pytz/${name}.tar.gz";
-      sha256 = "6f57732f0f8849817e9853eb9d50d85d1ebb1404f702dbc44ee627c642a486ca";
+    src = fetchPypi {
+      inherit pname version;
+      sha256 = "12cmd3j46d2gcw08bspvp6s9icfcvx88zjz52n1bli9dyvl5dh7m";
+      extension = "zip";
     };
 
     checkPhase = ''
-      ${python.interpreter} -m unittest discover -s pytz/tests
+      python -m unittest discover -s pytz/tests
     '';
 
     meta = {
@@ -19104,7 +18659,6 @@ in {
     };
   };
 
-
   pyutil = buildPythonPackage (rec {
     name = "pyutil-2.0.0";
 
@@ -19386,25 +18940,7 @@ in {
   requests2 = throw "requests2 has been deprecated. Use requests instead.";
 
   # use requests, not requests_2
-  requests = buildPythonPackage rec {
-    name = "requests-${version}";
-    version = "2.13.0";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/r/requests/${name}.tar.gz";
-      sha256 = "5722cd09762faa01276230270ff16af7acf7c5c45d623868d9ba116f15791ce8";
-    };
-
-    nativeBuildInputs = [ self.pytest ];
-    # sadly, tests require networking
-    doCheck = false;
-
-    meta = {
-      description = "An Apache2 licensed HTTP library, written in Python, for human beings";
-      homepage = http://docs.python-requests.org/en/latest/;
-      license = licenses.asl20;
-    };
-  };
+  requests = callPackage ../development/python-modules/requests { };
 
   requests_download = buildPythonPackage rec {
     pname = "requests_download";
@@ -19909,6 +19445,8 @@ in {
     };
   };
 
+  restructuredtext_lint = callPackage ../development/python-modules/restructuredtext_lint { };
+
   robomachine = buildPythonPackage rec {
     name = "robomachine-0.6";
 
@@ -21753,29 +21291,7 @@ in {
     };
   });
 
-  sphinx-testing = buildPythonPackage rec {
-    name = "sphinx-testing-${version}";
-    version = "0.7.1";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/s/sphinx-testing/${name}.tar.gz";
-      sha256 = "0cd235ce939770ae5128eda01d8611fb1e36d8129399e98565f99fcbff3a8062";
-    };
-
-    buildInputs = with self; [ mock ];
-    propagatedBuildInputs = with self; [ sphinx six ];
-
-    checkPhase = ''
-      ${python.interpreter} -m unittest discover -s tests
-    '';
-
-    meta = {
-      homepage = https://github.com/sphinx-doc/sphinx-testing;
-      license = licenses.bsd2;
-      description = "Testing utility classes and functions for Sphinx extensions";
-    };
-
-  };
+  sphinx-testing = callPackage ../development/python-modules/sphinx-testing { };
 
   sphinxcontrib-blockdiag = buildPythonPackage (rec {
     name = "${pname}-${version}";
@@ -22542,28 +22058,7 @@ in {
     };
   };
 
-  testtools = buildPythonPackage rec {
-    name = "testtools-${version}";
-    version = "1.8.0";
-
-    # Python 2 only judging from SyntaxError
-    disabled = isPy3k;
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/t/testtools/${name}.tar.gz";
-      sha256 = "15yxz8d70iy1b1x6gd7spvblq0mjxjardl4vnaqasxafzc069zca";
-    };
-
-    propagatedBuildInputs = with self; [ pbr python_mimeparse extras lxml unittest2 ];
-    buildInputs = with self; [ traceback2 ];
-    patches = [ ../development/python-modules/testtools_support_unittest2.patch ];
-
-    meta = {
-      description = "A set of extensions to the Python standard library's unit testing framework";
-      homepage = http://pypi.python.org/pypi/testtools;
-      license = licenses.mit;
-    };
-  };
+  testtools = callPackage ../development/python-modules/testtools { };
 
   traitlets = buildPythonPackage rec {
     pname = "traitlets";
@@ -23075,25 +22570,9 @@ in {
 
   twisted = callPackage ../development/python-modules/twisted { };
 
-  tzlocal = buildPythonPackage rec {
-    name = "tzlocal-1.2.2";
-
-    propagatedBuildInputs = with self; [ pytz ];
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/t/tzlocal/${name}.tar.gz";
-      sha256 = "0paj7vlsb0np8b5sp4bv64wxv7qk2piyp7xg29pkhdjwsbls9fnb";
-    };
-
-     # test fail (timezone test fail)
-     doCheck = false;
+  txtorcon = callPackage ../development/python-modules/txtorcon { };
 
-    meta = with pkgs.stdenv.lib; {
-      description = "Tzinfo object for the local timezone";
-      homepage = https://github.com/regebro/tzlocal;
-      license = licenses.cddl;
-    };
-  };
+  tzlocal = callPackage ../development/python-modules/tzlocal { };
 
   u-msgpack-python = callPackage ../development/python-modules/u-msgpack-python { };
 
@@ -23768,28 +23247,7 @@ EOF
     };
   };
 
-
-  werkzeug = buildPythonPackage rec {
-    name = "Werkzeug-0.11.10";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/W/Werkzeug/${name}.tar.gz";
-      sha256 = "1vpf98k4jp4yhbv2jbyq8dj5fdasrd26rkq34pacs5n7mkxxlr6c";
-    };
-
-    LC_ALL = "en_US.UTF-8";
-
-    propagatedBuildInputs = with self; [ itsdangerous ];
-    buildInputs = with self; [ pytest requests pkgs.glibcLocales ];
-
-
-
-    meta = {
-      homepage = http://werkzeug.pocoo.org/;
-      description = "A WSGI utility library for Python";
-      license = licenses.bsd3;
-    };
-  };
+  werkzeug = callPackage ../development/python-modules/werkzeug { };
 
   wheel = callPackage ../development/python-modules/wheel { };
 
@@ -25832,27 +25290,7 @@ EOF
 
   };
 
-  service-identity = buildPythonPackage rec {
-    name = "service-identity-${version}";
-    version = "16.0.0";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/s/service_identity/service_identity-${version}.tar.gz";
-      sha256 = "0dih7i7d36nbllcxgfkvbnaj1wlzhwfnpr4b97dz74czylif4c06";
-    };
-
-    propagatedBuildInputs = with self; [
-      characteristic pyasn1 pyasn1-modules pyopenssl idna attrs
-    ];
-
-    buildInputs = with self; [
-      pytest
-    ];
-
-    checkPhase = ''
-      py.test
-    '';
-  };
+  service-identity = callPackage ../development/python-modules/service_identity { };
 
   signedjson = buildPythonPackage rec {
     name = "signedjson-${version}";