summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/Cython/default.nix2
-rw-r--r--pkgs/development/python-modules/aiodns/default.nix8
-rw-r--r--pkgs/development/python-modules/altair/default.nix16
-rw-r--r--pkgs/development/python-modules/aws-adfs/default.nix33
-rw-r--r--pkgs/development/python-modules/boto3/default.nix4
-rw-r--r--pkgs/development/python-modules/botocore/default.nix4
-rw-r--r--pkgs/development/python-modules/celery/default.nix9
-rw-r--r--pkgs/development/python-modules/cmd2/default.nix18
-rw-r--r--pkgs/development/python-modules/cmd2/old.nix49
-rw-r--r--pkgs/development/python-modules/credstash/default.nix12
-rw-r--r--pkgs/development/python-modules/cvxopt/default.nix5
-rw-r--r--pkgs/development/python-modules/cypari2/default.nix6
-rw-r--r--pkgs/development/python-modules/cysignals/default.nix5
-rw-r--r--pkgs/development/python-modules/djmail/default.nix11
-rw-r--r--pkgs/development/python-modules/eve/default.nix5
-rw-r--r--pkgs/development/python-modules/eve/setup.patch21
-rw-r--r--pkgs/development/python-modules/events/default.nix17
-rw-r--r--pkgs/development/python-modules/future/default.nix4
-rw-r--r--pkgs/development/python-modules/geojson/default.nix8
-rw-r--r--pkgs/development/python-modules/grpcio/default.nix6
-rw-r--r--pkgs/development/python-modules/kombu/default.nix25
-rw-r--r--pkgs/development/python-modules/libarcus/default.nix3
-rw-r--r--pkgs/development/python-modules/libvirt/default.nix4
-rw-r--r--pkgs/development/python-modules/parsy/default.nix26
-rw-r--r--pkgs/development/python-modules/pdfx/default.nix33
-rw-r--r--pkgs/development/python-modules/pelican/default.nix3
-rw-r--r--pkgs/development/python-modules/pycaption/default.nix41
-rw-r--r--pkgs/development/python-modules/pyscard/default.nix4
-rw-r--r--pkgs/development/python-modules/pytest/default.nix5
-rw-r--r--pkgs/development/python-modules/scikitlearn/default.nix4
-rw-r--r--pkgs/development/python-modules/scikitlearn/n_iter-should-be-less-than-max_iter-using-lbgfs.patch73
-rw-r--r--pkgs/development/python-modules/simpy/default.nix18
-rw-r--r--pkgs/development/python-modules/trezor/default.nix4
-rw-r--r--pkgs/development/python-modules/trollius/default.nix7
-rw-r--r--pkgs/development/python-modules/uranium/default.nix4
-rw-r--r--pkgs/development/python-modules/vega_datasets/default.nix25
-rw-r--r--pkgs/development/python-modules/wcwidth/default.nix26
37 files changed, 451 insertions, 97 deletions
diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix
index 1c391d3495dd..124e8b80ba02 100644
--- a/pkgs/development/python-modules/Cython/default.nix
+++ b/pkgs/development/python-modules/Cython/default.nix
@@ -44,7 +44,7 @@ in buildPythonPackage rec {
 
   checkPhase = ''
     export HOME="$NIX_BUILD_TOP"
-    ${python.interpreter} runtests.py \
+    ${python.interpreter} runtests.py -j$NIX_BUILD_CORES \
       ${stdenv.lib.optionalString (builtins.length excludedTests != 0)
         ''--exclude="(${builtins.concatStringsSep "|" excludedTests})"''}
   '';
diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix
index 50e70d87f9f5..204f7bfc0dfb 100644
--- a/pkgs/development/python-modules/aiodns/default.nix
+++ b/pkgs/development/python-modules/aiodns/default.nix
@@ -1,5 +1,5 @@
 { stdenv, buildPythonPackage, fetchPypi
-, isPy33, isPy26, isPy27, isPyPy, python, pycares, asyncio, trollius }:
+, isPy33, isPy27, isPyPy, python, pycares, asyncio, trollius }:
 
 buildPythonPackage rec {
   pname = "aiodns";
@@ -10,9 +10,9 @@ buildPythonPackage rec {
     sha256 = "d8677adc679ce8d0ef706c14d9c3d2f27a0e0cc11d59730cdbaf218ad52dd9ea";
   };
 
-  propagatedBuildInputs = with stdenv.lib; [ pycares ] 
-    ++ optional isPy33 asyncio 
-    ++ optional (isPy26 || isPy27 || isPyPy) trollius;
+  propagatedBuildInputs = with stdenv.lib; [ pycares ]
+    ++ optional isPy33 asyncio
+    ++ optional (isPy27 || isPyPy) trollius;
 
   checkPhase = ''
     ${python.interpreter} tests.py
diff --git a/pkgs/development/python-modules/altair/default.nix b/pkgs/development/python-modules/altair/default.nix
index 274fa0fbbf27..8e75f1f3d8de 100644
--- a/pkgs/development/python-modules/altair/default.nix
+++ b/pkgs/development/python-modules/altair/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, buildPythonPackage, fetchPypi
-, pytest, glibcLocales, vega, pandas, ipython, traitlets }:
+{ stdenv, buildPythonPackage, fetchPypi, fetchpatch
+, pytest, jinja2, sphinx, vega_datasets, ipython, glibcLocales
+, entrypoints, jsonschema, numpy, pandas, six, toolz, typing }:
 
 buildPythonPackage rec {
   pname = "altair";
@@ -10,18 +11,19 @@ buildPythonPackage rec {
     sha256 = "e8b222588dde98ec614e6808357fde7fa321118db44cc909df2bf30158d931c0";
   };
 
-  postPatch = ''
-    sed -i "s/vega==/vega>=/g" setup.py
-  '';
+  patches = fetchpatch {
+    url = https://github.com/altair-viz/altair/commit/bfca8aecce9593c48aa5834e3f8f841deb58391c.patch;
+    sha256 = "01izc5d8c6ry3mh0k0hfasb6jc4720g75yw2qdlp9ja8mnjsp4k3";
+  };
 
-  checkInputs = [ pytest glibcLocales ];
+  checkInputs = [ pytest jinja2 sphinx vega_datasets ipython glibcLocales ];
 
   checkPhase = ''
     export LANG=en_US.UTF-8
     py.test altair --doctest-modules
   '';
 
-  propagatedBuildInputs = [ vega pandas ipython traitlets ];
+  propagatedBuildInputs = [ entrypoints jsonschema numpy pandas six toolz typing ];
 
   meta = with stdenv.lib; {
     description = "A declarative statistical visualization library for Python.";
diff --git a/pkgs/development/python-modules/aws-adfs/default.nix b/pkgs/development/python-modules/aws-adfs/default.nix
new file mode 100644
index 000000000000..c42ad6f1d6c9
--- /dev/null
+++ b/pkgs/development/python-modules/aws-adfs/default.nix
@@ -0,0 +1,33 @@
+{ lib, buildPythonPackage, fetchPypi
+, pytest, pytestrunner, pytestcov, mock, glibcLocales, lxml, boto3, requests, click, configparser }:
+
+buildPythonPackage rec {
+  version = "0.12.0";
+  pname = "aws-adfs";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1cjrm61k6905dmhgrqyc5caxx5hbhj3sr6cx4r6sbdyz453i7pc6";
+  };
+
+  # Relax version constraint
+  patchPhase = ''
+    sed -i 's/coverage < 4/coverage/' setup.py
+  '';
+
+  # Test suite writes files to $HOME/.aws/, or /homeless-shelter if unset
+  HOME = ".";
+
+  # Required for python3 tests, along with glibcLocales
+  LC_ALL = "en_US.UTF-8";
+
+  checkInputs = [ glibcLocales pytest pytestrunner pytestcov mock ];
+  propagatedBuildInputs = [ lxml boto3 requests click configparser ];
+
+  meta = {
+    description = "Command line tool to ease aws cli authentication against ADFS";
+    homepage = https://github.com/venth/aws-adfs;
+    license = lib.licenses.psfl;
+    maintainers = [ lib.maintainers.bhipple ];
+  };
+}
diff --git a/pkgs/development/python-modules/boto3/default.nix b/pkgs/development/python-modules/boto3/default.nix
index b3a15ba08682..dca7844dec9c 100644
--- a/pkgs/development/python-modules/boto3/default.nix
+++ b/pkgs/development/python-modules/boto3/default.nix
@@ -13,13 +13,13 @@
 
 buildPythonPackage rec {
   pname =  "boto3";
-  version = "1.7.48";
+  version = "1.7.57";
 
   src = fetchFromGitHub {
     owner = "boto";
     repo  = "boto3";
     rev   = version;
-    sha256 = "0pag37yy6693k8xvlyx4f06asab52i89xljy2ip121i60ih3jfw4";
+    sha256 = "0rp3vclx7mvfl6isa47m7dzlrf33qb9vj53p0gj4cw3mgl14cnbl";
   };
 
   propagatedBuildInputs = [ botocore jmespath s3transfer ] ++ lib.optionals (!isPy3k) [ futures ];
diff --git a/pkgs/development/python-modules/botocore/default.nix b/pkgs/development/python-modules/botocore/default.nix
index fada751968b3..70a5af97fdaa 100644
--- a/pkgs/development/python-modules/botocore/default.nix
+++ b/pkgs/development/python-modules/botocore/default.nix
@@ -11,11 +11,11 @@
 
 buildPythonPackage rec {
   pname = "botocore";
-  version = "1.10.48";
+  version = "1.10.57";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1432drc7482nwrppwkk1i6ars3wz9w2g9rsxkz5nlxmyf9qm260j";
+    sha256 = "0mif7c12643hac6zxq89gv0wjf4r3vqlmm01bm68psljaj40jnpi";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/celery/default.nix b/pkgs/development/python-modules/celery/default.nix
index 3a357282c165..71911da08f43 100644
--- a/pkgs/development/python-modules/celery/default.nix
+++ b/pkgs/development/python-modules/celery/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchPypi, iana-etc, libredirect,
+{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, iana-etc, libredirect,
   pytest, case, kombu, billiard, pytz, anyjson, amqp, eventlet
 }:
 
@@ -11,6 +11,13 @@ buildPythonPackage rec {
     sha256 = "ff727c115533edbc7b81b2b4ba1ec88d1c2fc4836e1e2f4c3c33a76ff53e5d7f";
   };
 
+  # Skip test_RedisBackend.test_timeouts_in_url_coerced
+  # See https://github.com/celery/celery/pull/4847
+  patches = fetchpatch {
+    url = https://github.com/celery/celery/commit/b2668607c909c61becd151905b4525190c19ff4a.patch;
+    sha256 = "11w0z2ycyh8kccj4y69zb7bxppiipcwwigg6jn1q9yrcsvz170jq";
+  };
+
   # make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
   preCheck = stdenv.lib.optionalString stdenv.isLinux ''
     export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \
diff --git a/pkgs/development/python-modules/cmd2/default.nix b/pkgs/development/python-modules/cmd2/default.nix
index 5ffa51def0d2..e83fd4163e4a 100644
--- a/pkgs/development/python-modules/cmd2/default.nix
+++ b/pkgs/development/python-modules/cmd2/default.nix
@@ -1,17 +1,15 @@
-{ stdenv, fetchPypi, buildPythonPackage, pythonOlder
-, pyperclip, six, pyparsing, vim
+{ stdenv, fetchPypi, buildPythonPackage, pythonOlder, isPy3k
+, pyperclip, six, pyparsing, vim, wcwidth, colorama
 , contextlib2 ? null, subprocess32 ? null
 , pytest, mock, which, fetchFromGitHub, glibcLocales
 }:
 buildPythonPackage rec {
   pname = "cmd2";
-  version = "0.8.0";
+  version = "0.9.1";
 
-  src = fetchFromGitHub {
-    owner = "python-cmd2";
-    repo = "cmd2";
-    rev = version;
-    sha256 = "0nw2b7n7zg51bc3glxw0l9fn91mwjnjshklhmxhyvjbsg7khf64z";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1wpw4f9zix30hfncm0hwxjjdx78zq26x3r8s9nvsq9vnxf41xb49";
   };
 
   LC_ALL="en_US.UTF-8";
@@ -31,14 +29,16 @@ buildPythonPackage rec {
     py.test -k 'not test_path_completion_user_expansion'
   '';
   doCheck = !stdenv.isDarwin;
+  disabled = !isPy3k;
 
   propagatedBuildInputs = [
+    colorama
     pyperclip
     six
     pyparsing
+    wcwidth
   ]
   ++ stdenv.lib.optional (pythonOlder "3.5") contextlib2
-  ++ stdenv.lib.optional (pythonOlder "3.0") subprocess32
   ;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/python-modules/cmd2/old.nix b/pkgs/development/python-modules/cmd2/old.nix
new file mode 100644
index 000000000000..5ffa51def0d2
--- /dev/null
+++ b/pkgs/development/python-modules/cmd2/old.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchPypi, buildPythonPackage, pythonOlder
+, pyperclip, six, pyparsing, vim
+, contextlib2 ? null, subprocess32 ? null
+, pytest, mock, which, fetchFromGitHub, glibcLocales
+}:
+buildPythonPackage rec {
+  pname = "cmd2";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "python-cmd2";
+    repo = "cmd2";
+    rev = version;
+    sha256 = "0nw2b7n7zg51bc3glxw0l9fn91mwjnjshklhmxhyvjbsg7khf64z";
+  };
+
+  LC_ALL="en_US.UTF-8";
+
+  postPatch = stdenv.lib.optional stdenv.isDarwin ''
+    # Fake the impure dependencies pbpaste and pbcopy
+    mkdir bin
+    echo '#/bin/sh' > bin/pbpaste
+    echo '#/bin/sh' > bin/pbcopy
+    chmod +x bin/{pbcopy,pbpaste}
+    export PATH=$(realpath bin):$PATH
+  '';
+
+  checkInputs= [ pytest mock which vim glibcLocales ];
+  checkPhase = ''
+    # test_path_completion_user_expansion might be fixed in the next release
+    py.test -k 'not test_path_completion_user_expansion'
+  '';
+  doCheck = !stdenv.isDarwin;
+
+  propagatedBuildInputs = [
+    pyperclip
+    six
+    pyparsing
+  ]
+  ++ stdenv.lib.optional (pythonOlder "3.5") contextlib2
+  ++ stdenv.lib.optional (pythonOlder "3.0") subprocess32
+  ;
+
+  meta = with stdenv.lib; {
+    description = "Enhancements for standard library's cmd module";
+    homepage = https://github.com/python-cmd2/cmd2;
+    maintainers = with maintainers; [ teto ];
+  };
+}
diff --git a/pkgs/development/python-modules/credstash/default.nix b/pkgs/development/python-modules/credstash/default.nix
index 8be1780aa992..e19850be8cee 100644
--- a/pkgs/development/python-modules/credstash/default.nix
+++ b/pkgs/development/python-modules/credstash/default.nix
@@ -1,19 +1,15 @@
-{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, cryptography, boto3, pyyaml, docutils }:
+{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, cryptography, boto3, pyyaml, docutils, nose }:
 
 buildPythonPackage rec {
   pname = "credstash";
-  version = "1.14.0";
+  version = "1.15.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "718b337f7a6fa001e014386071f05c59900525d0507009126d2fe8d75fe0761d";
+    sha256 = "814560f99ae2409e2c6d906d878f9dadada5d1d0a950aafb6b2c0d535291bdfb";
   };
 
-  patches = fetchpatch {
-    url = https://github.com/fugue/credstash/pull/178.patch;
-    sha256 = "15ih4h5v63g7qfmqdl4zca147wkcrx8vnsh4ns33001dipcfb5sc";
-    excludes = [ ".travis.yml" ];
-  };
+  nativeBuildInputs = [ nose ];
 
   propagatedBuildInputs = [ cryptography boto3 pyyaml docutils ];
 
diff --git a/pkgs/development/python-modules/cvxopt/default.nix b/pkgs/development/python-modules/cvxopt/default.nix
index e17bd38da02b..906e2c0bbe4a 100644
--- a/pkgs/development/python-modules/cvxopt/default.nix
+++ b/pkgs/development/python-modules/cvxopt/default.nix
@@ -46,6 +46,11 @@ buildPythonPackage rec {
     export CVXOPT_FFTW_INC_DIR=${fftw.dev}/include
   '';
 
+  # https://github.com/cvxopt/cvxopt/issues/122
+  # This is fixed on staging (by #43234, status 2018-07-15), but until that
+  # lands we should disable the tests. Otherwise the 99% of use cases that
+  # should be unaffected by that failure are affected.
+  doCheck = false;
   checkPhase = ''
     ${python.interpreter} -m unittest discover -s tests
   '';
diff --git a/pkgs/development/python-modules/cypari2/default.nix b/pkgs/development/python-modules/cypari2/default.nix
index fc3c311a5061..6df19e4c94be 100644
--- a/pkgs/development/python-modules/cypari2/default.nix
+++ b/pkgs/development/python-modules/cypari2/default.nix
@@ -7,16 +7,15 @@
 , gmp
 , cython
 , cysignals
-, six
 }:
 
 buildPythonPackage rec {
   pname = "cypari2";
-  version = "1.1.4"; # remove six dependency on upgrade to >1.1.4
+  version = "1.2.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0n0mp8qmvvzmfaawg39d3mkyzf65q2zkz7bnqyk4sfjbz4xwc6mb";
+    sha256 = "0v2kikwf0advq8j76nwzhlacwj1yys9cvajm4fqgmasjdsnf1q4k";
   };
 
   # This differs slightly from the default python installPhase in that it pip-installs
@@ -39,7 +38,6 @@ buildPythonPackage rec {
   propagatedBuildInputs = [
     cysignals
     cython
-    six # after 1.1.4: will not be needed
   ];
 
   checkPhase = ''
diff --git a/pkgs/development/python-modules/cysignals/default.nix b/pkgs/development/python-modules/cysignals/default.nix
index dc88c4d94f7a..8908f6ea9d5e 100644
--- a/pkgs/development/python-modules/cysignals/default.nix
+++ b/pkgs/development/python-modules/cysignals/default.nix
@@ -9,11 +9,11 @@ assert pariSupport -> pari != null;
 
 buildPythonPackage rec {
   pname = "cysignals";
-  version = "1.7.1";
+  version = "1.7.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "15nky8siwlc7s8v23vv4m0mnxa1z6jcs2qfr26m2mkw9j9g2na2j";
+    sha256 = "0rzwd9bjw6bj01xcmimqfim1g0njjyyyal0f93frm1la4hcmq96v";
   };
 
   # explicit check:
@@ -23,6 +23,7 @@ buildPythonPackage rec {
   ];
 
   # currently fails, probably because of formatting changes in gdb 8.0
+  # https://trac.sagemath.org/ticket/24692
   doCheck = false;
 
   preCheck = ''
diff --git a/pkgs/development/python-modules/djmail/default.nix b/pkgs/development/python-modules/djmail/default.nix
index aaea8175f726..1659d46abbc5 100644
--- a/pkgs/development/python-modules/djmail/default.nix
+++ b/pkgs/development/python-modules/djmail/default.nix
@@ -1,5 +1,6 @@
-{ lib, buildPythonPackage, fetchPypi,
-  celery, django, psycopg2
+{ lib, buildPythonPackage, fetchPypi
+, glibcLocales
+, celery, django, psycopg2
 }:
 
 buildPythonPackage rec {
@@ -7,7 +8,7 @@ buildPythonPackage rec {
   version = "1.1.0";
 
   meta = {
-    description = "Simple, powerfull and nonobstructive django email middleware.";
+    description = "Simple, powerfull and nonobstructive django email middleware";
     homepage = https://github.com/bameda/djmail;
     license = lib.licenses.bsd3;
   };
@@ -17,6 +18,10 @@ buildPythonPackage rec {
     sha256 = "87d2a8b4bdf67ae9b312e127ccc873a53116cf297ec786460d782ce82eaa76b5";
   };
 
+  nativeBuildInputs = [ glibcLocales ];
+
+  LC_ALL = "en_US.UTF-8";
+
   propagatedBuildInputs = [ celery django psycopg2 ];
 
   # django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
diff --git a/pkgs/development/python-modules/eve/default.nix b/pkgs/development/python-modules/eve/default.nix
index deed6536fe74..b8daa5304c77 100644
--- a/pkgs/development/python-modules/eve/default.nix
+++ b/pkgs/development/python-modules/eve/default.nix
@@ -4,17 +4,12 @@
 buildPythonPackage rec {
   pname = "Eve";
   version = "0.8";
-  name  = "${pname}-${version}";
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "9f926c715f88c7a92dc2b950ccc09cccd91f72fe0e93cde806b85d25b947df2f";
   };
 
-  patches = [
-    ./setup.patch
-  ];
-
   propagatedBuildInputs = [
     cerberus
     events
diff --git a/pkgs/development/python-modules/eve/setup.patch b/pkgs/development/python-modules/eve/setup.patch
deleted file mode 100644
index 8e5ca27757e1..000000000000
--- a/pkgs/development/python-modules/eve/setup.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git i/setup.py w/setup.py
-index 0176467..2b74988 100755
---- i/setup.py
-+++ w/setup.py
-@@ -9,11 +9,11 @@ install_requires = [
-     'cerberus>=0.9.2,<0.10',
-     'events>=0.2.1,<0.3',
-     'simplejson>=3.3.0,<4.0',
--    'werkzeug>=0.9.4,<=0.11.15',
--    'markupsafe>=0.23,<1.0',
--    'jinja2>=2.8,<3.0',
--    'itsdangerous>=0.24,<1.0',
--    'flask>=0.10.1,<=0.12',
-+    'werkzeug>=0.9.4',
-+    'markupsafe>=0.23',
-+    'jinja2>=2.8',
-+    'itsdangerous>=0.24',
-+    'flask>=0.10.1',
-     'pymongo>=3.4',
-     'flask-pymongo>=0.4',
- ]
diff --git a/pkgs/development/python-modules/events/default.nix b/pkgs/development/python-modules/events/default.nix
new file mode 100644
index 000000000000..28e7726a829b
--- /dev/null
+++ b/pkgs/development/python-modules/events/default.nix
@@ -0,0 +1,17 @@
+{ lib, buildPythonPackage, fetchPypi }:
+
+buildPythonPackage rec {
+  pname = "Events";
+  version = "0.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "f4d9c41a5c160ce504278f219fe56f44242ca63794a0ad638b52d1e087ac2a41";
+  };
+
+  meta = with lib; {
+    homepage = http://events.readthedocs.org;
+    description = "Bringing the elegance of C# EventHanlder to Python";
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/future/default.nix b/pkgs/development/python-modules/future/default.nix
index ba84d80dd0be..535fe05b4388 100644
--- a/pkgs/development/python-modules/future/default.nix
+++ b/pkgs/development/python-modules/future/default.nix
@@ -1,9 +1,6 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, isPy26
-, importlib
-, argparse
 }:
 
 buildPythonPackage rec {
@@ -15,7 +12,6 @@ buildPythonPackage rec {
     sha256 = "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773";
   };
 
-  propagatedBuildInputs = lib.optionals isPy26 [ importlib argparse ];
   doCheck = false;
 
   meta = {
diff --git a/pkgs/development/python-modules/geojson/default.nix b/pkgs/development/python-modules/geojson/default.nix
index 902d1b266534..faf557735399 100644
--- a/pkgs/development/python-modules/geojson/default.nix
+++ b/pkgs/development/python-modules/geojson/default.nix
@@ -2,11 +2,13 @@
 
 buildPythonPackage rec {
   pname = "geojson";
-  version = "2.3.0";
+  version = "2.4.0";
+
+  format = "wheel";
 
   src = fetchPypi {
-    inherit pname version;
-    sha256 = "06ihcb8839zzgk5jcv18kc6nqld4hhj3nk4f3drzcr8n8893v1y8";
+    inherit pname version format;
+    sha256 = "0r9pc8hgnc5hf5rq98vinbrncn08v4kgzdfmfs14rfypvacsmfpj";
   };
 
   LC_ALL = "en_US.UTF-8";
diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix
index e53989bcbcfd..1846c7bcd896 100644
--- a/pkgs/development/python-modules/grpcio/default.nix
+++ b/pkgs/development/python-modules/grpcio/default.nix
@@ -1,5 +1,5 @@
 { stdenv, buildPythonPackage, fetchPypi, lib
-, six, protobuf, enum34, futures, isPy26, isPy27, isPy34 }:
+, six, protobuf, enum34, futures, isPy27, isPy34 }:
 
 buildPythonPackage rec {
   pname = "grpcio";
@@ -11,8 +11,8 @@ buildPythonPackage rec {
   };
 
   propagatedBuildInputs = [ six protobuf ]
-                        ++ lib.optionals (isPy26 || isPy27 || isPy34) [ enum34 ]
-                        ++ lib.optionals (isPy26 || isPy27) [ futures ];
+                        ++ lib.optionals (isPy27 || isPy34) [ enum34 ]
+                        ++ lib.optionals (isPy27) [ futures ];
 
   meta = with stdenv.lib; {
     description = "HTTP/2-based RPC framework";
diff --git a/pkgs/development/python-modules/kombu/default.nix b/pkgs/development/python-modules/kombu/default.nix
new file mode 100644
index 000000000000..7620ee944417
--- /dev/null
+++ b/pkgs/development/python-modules/kombu/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildPythonPackage, fetchPypi, pytest, case, pytz, amqp }:
+
+buildPythonPackage rec {
+    pname = "kombu";
+    version = "4.2.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "86adec6c60f63124e2082ea8481bbe4ebe04fde8ebed32c177c7f0cd2c1c9082";
+  };
+
+  postPatch = ''
+    substituteInPlace requirements/test.txt --replace "pytest-sugar" ""
+  '';
+
+  checkInputs = [ pytest case pytz ];
+
+  propagatedBuildInputs = [ amqp ];
+
+  meta = with lib; {
+    description = "Messaging library for Python";
+    homepage    = https://github.com/celery/kombu;
+    license     = licenses.bsd3;
+  };
+}
diff --git a/pkgs/development/python-modules/libarcus/default.nix b/pkgs/development/python-modules/libarcus/default.nix
index 4a937ac94f09..2fc66e810d06 100644
--- a/pkgs/development/python-modules/libarcus/default.nix
+++ b/pkgs/development/python-modules/libarcus/default.nix
@@ -3,7 +3,8 @@
 
 buildPythonPackage rec {
   pname = "libarcus";
-  version = "3.3.0";
+  version = "3.4.1";
+  format = "other";
 
   src = fetchFromGitHub {
     owner = "Ultimaker";
diff --git a/pkgs/development/python-modules/libvirt/default.nix b/pkgs/development/python-modules/libvirt/default.nix
index 65e8f3c7ba6c..a99d4542ba5a 100644
--- a/pkgs/development/python-modules/libvirt/default.nix
+++ b/pkgs/development/python-modules/libvirt/default.nix
@@ -2,12 +2,12 @@
 
 buildPythonPackage rec {
   pname = "libvirt";
-  version = "4.4.0";
+  version = "4.5.0";
 
   src = assert version == libvirt.version; fetchgit {
     url = git://libvirt.org/libvirt-python.git;
     rev = "v${version}";
-    sha256 = "01kwwwacbq7kbsslb2ac3wwfs4r8nsv7jhn0df2mmff30izbhq34";
+    sha256 = "0w2rzkxv7jsq4670m0j5c6p4hpyi0r0ja6wd3wdvixcwc6hhx407";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/python-modules/parsy/default.nix b/pkgs/development/python-modules/parsy/default.nix
new file mode 100644
index 000000000000..4183f30caad9
--- /dev/null
+++ b/pkgs/development/python-modules/parsy/default.nix
@@ -0,0 +1,26 @@
+{ lib, buildPythonPackage, fetchPypi, pythonOlder, pytest }:
+
+buildPythonPackage rec {
+  pname = "parsy";
+  version = "1.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0mdqg07x5ybmbmj55x75gyhfcjrn7ml0cf3z0jwbskx845j31m6x";
+  };
+
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    py.test test/
+  '';
+
+  disabled = pythonOlder "3.4";
+
+  meta = with lib; {
+    homepage = https://github.com/python-parsy/parsy;
+    description = "Easy-to-use parser combinators, for parsing in pure Python";
+    license = [ licenses.mit ];
+    maintainers = with maintainers; [ aepsil0n ];
+  };
+}
diff --git a/pkgs/development/python-modules/pdfx/default.nix b/pkgs/development/python-modules/pdfx/default.nix
new file mode 100644
index 000000000000..d2397fb5c82b
--- /dev/null
+++ b/pkgs/development/python-modules/pdfx/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, buildPythonPackage, fetchFromGitHub, pdfminer, chardet, pytest }:
+
+buildPythonPackage rec {
+  pname = "pdfx";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "metachris";
+    repo = "pdfx";
+    rev = "v${version}";
+    sha256 = "1183k4h5qdf8y0imbir9ja3yzzsvdmqgbv3bi6dnkgr1wy2xfr0v";
+  };
+
+  # Remove after https://github.com/metachris/pdfx/pull/28
+  prePatch = ''
+    sed -i -e "s|pdfminer2|pdfminer.six|" setup.py
+  '';
+
+  propagatedBuildInputs = [ pdfminer chardet ];
+
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    py.test
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Extract references (pdf, url, doi, arxiv) and metadata from a PDF";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ marsam ];
+  };
+}
diff --git a/pkgs/development/python-modules/pelican/default.nix b/pkgs/development/python-modules/pelican/default.nix
index 3b15e7a30279..2d1f707a8ebd 100644
--- a/pkgs/development/python-modules/pelican/default.nix
+++ b/pkgs/development/python-modules/pelican/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchFromGitHub, isPy26
+{ stdenv, buildPythonPackage, fetchFromGitHub
 , glibcLocales, pandoc, git
 , mock, nose, markdown, lxml, typogrify
 , jinja2, pygments, docutils, pytz, unidecode, six, dateutil, feedgenerator
@@ -7,7 +7,6 @@
 buildPythonPackage rec {
   pname = "pelican";
   version = "3.7.1";
-  disabled = isPy26;
 
   src = fetchFromGitHub {
     owner = "getpelican";
diff --git a/pkgs/development/python-modules/pycaption/default.nix b/pkgs/development/python-modules/pycaption/default.nix
new file mode 100644
index 000000000000..845630e514fa
--- /dev/null
+++ b/pkgs/development/python-modules/pycaption/default.nix
@@ -0,0 +1,41 @@
+{ lib, fetchpatch
+, buildPythonPackage, fetchPypi, isPy3k, pythonOlder
+, beautifulsoup4, lxml, cssutils, future, enum34, six
+}:
+
+buildPythonPackage rec {
+  pname = "pycaption";
+  version = "1.0.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0f2hx9ky65c4niws3x5yx59yi8mqqrw9b2cghd220g4hj9yl800h";
+  };
+
+  disabled = !isPy3k;
+
+  prePatch = ''
+    substituteInPlace setup.py \
+      --replace 'beautifulsoup4>=4.2.1,<4.5.0' \
+                'beautifulsoup4>=4.2.1,<=4.6.0'
+  '';
+
+  # don't require enum34 on python >= 3.4
+  patches = [
+    (fetchpatch {
+        url = "https://github.com/pbs/pycaption/pull/161.patch";
+        sha256 = "0p58awpsqx1qc3x9zfl1gd85h1nk7204lzn4kglsgh1bka0j237j";
+    })
+  ];
+
+  propagatedBuildInputs = [ beautifulsoup4 lxml cssutils future enum34 six ];
+
+  # Tests not included in pypi (?)
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Closed caption converter";
+    homepage = https://github.com/pbs/pycaption;
+    license = with licenses; [ asl20 ];
+  };
+}
diff --git a/pkgs/development/python-modules/pyscard/default.nix b/pkgs/development/python-modules/pyscard/default.nix
index 3290fb74fa18..4784e46ffb21 100644
--- a/pkgs/development/python-modules/pyscard/default.nix
+++ b/pkgs/development/python-modules/pyscard/default.nix
@@ -10,11 +10,11 @@ buildPythonPackage rec {
   };
 
   postPatch = ''
-    sed -e 's!"libpcsclite\.so\.1"!"${pcsclite}/lib/libpcsclite.so.1"!' \
+    sed -e 's!"libpcsclite\.so\.1"!"${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1"!' \
         -i smartcard/scard/winscarddll.c
   '';
 
-  NIX_CFLAGS_COMPILE = "-isystem ${pcsclite}/include/PCSC/";
+  NIX_CFLAGS_COMPILE = "-isystem ${stdenv.lib.getDev pcsclite}/include/PCSC/";
 
   propagatedBuildInputs = [ pcsclite ];
   buildInputs = [ swig ] ++ stdenv.lib.optional stdenv.isDarwin PCSC;
diff --git a/pkgs/development/python-modules/pytest/default.nix b/pkgs/development/python-modules/pytest/default.nix
index d8d22ced974e..b5a8cc252b97 100644
--- a/pkgs/development/python-modules/pytest/default.nix
+++ b/pkgs/development/python-modules/pytest/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchPypi, isPy26, argparse, attrs, hypothesis, py
+{ stdenv, buildPythonPackage, fetchPypi, attrs, hypothesis, py
 , setuptools_scm, setuptools, six, pluggy, funcsigs, isPy3k, more-itertools
 , atomicwrites, mock
 }:
@@ -19,8 +19,7 @@ buildPythonPackage rec {
   checkInputs = [ hypothesis mock ];
   buildInputs = [ setuptools_scm ];
   propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites]
-    ++ (stdenv.lib.optional (!isPy3k) funcsigs)
-    ++ (stdenv.lib.optional isPy26 argparse);
+    ++ (stdenv.lib.optional (!isPy3k) funcsigs);
 
   checkPhase = ''
     runHook preCheck
diff --git a/pkgs/development/python-modules/scikitlearn/default.nix b/pkgs/development/python-modules/scikitlearn/default.nix
index dc63fe7d104d..edaf7cd90cc5 100644
--- a/pkgs/development/python-modules/scikitlearn/default.nix
+++ b/pkgs/development/python-modules/scikitlearn/default.nix
@@ -14,6 +14,10 @@ buildPythonPackage rec {
     sha256 = "5ca0ad32ee04abe0d4ba02c8d89d501b4e5e0304bdf4d45c2e9875a735b323a0";
   };
 
+  # basically https://github.com/scikit-learn/scikit-learn/pull/10723,
+  # but rebased onto 0.19.1
+  patches = [ ./n_iter-should-be-less-than-max_iter-using-lbgfs.patch ];
+
   buildInputs = [ nose pillow gfortran glibcLocales ];
   propagatedBuildInputs = [ numpy scipy numpy.blas ];
 
diff --git a/pkgs/development/python-modules/scikitlearn/n_iter-should-be-less-than-max_iter-using-lbgfs.patch b/pkgs/development/python-modules/scikitlearn/n_iter-should-be-less-than-max_iter-using-lbgfs.patch
new file mode 100644
index 000000000000..67309a673d08
--- /dev/null
+++ b/pkgs/development/python-modules/scikitlearn/n_iter-should-be-less-than-max_iter-using-lbgfs.patch
@@ -0,0 +1,73 @@
+diff --git a/sklearn/linear_model/huber.py b/sklearn/linear_model/huber.py
+index e17dc1e..665654d 100644
+--- a/sklearn/linear_model/huber.py
++++ b/sklearn/linear_model/huber.py
+@@ -181,7 +181,11 @@ class HuberRegressor(LinearModel, RegressorMixin, BaseEstimator):
+ 
+     n_iter_ : int
+         Number of iterations that fmin_l_bfgs_b has run for.
+-        Not available if SciPy version is 0.9 and below.
++
++        .. versionchanged:: 0.20
++
++            In SciPy <= 1.0.0 the number of lbfgs iterations may exceed
++            ``max_iter``. ``n_iter_`` will now report at most ``max_iter``.
+ 
+     outliers_ : array, shape (n_samples,)
+         A boolean mask which is set to True where the samples are identified
+@@ -272,7 +276,9 @@ class HuberRegressor(LinearModel, RegressorMixin, BaseEstimator):
+             raise ValueError("HuberRegressor convergence failed:"
+                              " l-BFGS-b solver terminated with %s"
+                              % dict_['task'].decode('ascii'))
+-        self.n_iter_ = dict_.get('nit', None)
++        # In scipy <= 1.0.0, nit may exceed maxiter.
++        # See https://github.com/scipy/scipy/issues/7854.
++        self.n_iter_ = min(dict_.get('nit', None), self.max_iter)
+         self.scale_ = parameters[-1]
+         if self.fit_intercept:
+             self.intercept_ = parameters[-2]
+diff --git a/sklearn/linear_model/logistic.py b/sklearn/linear_model/logistic.py
+index 8646c9a..c72a7d9 100644
+--- a/sklearn/linear_model/logistic.py
++++ b/sklearn/linear_model/logistic.py
+@@ -718,7 +718,9 @@ def logistic_regression_path(X, y, pos_class=None, Cs=10, fit_intercept=True,
+                 warnings.warn("lbfgs failed to converge. Increase the number "
+                               "of iterations.")
+             try:
+-                n_iter_i = info['nit'] - 1
++                # In scipy <= 1.0.0, nit may exceed maxiter.
++                # See https://github.com/scipy/scipy/issues/7854.
++                n_iter_i = min(info['nit'], max_iter)
+             except:
+                 n_iter_i = info['funcalls'] - 1
+         elif solver == 'newton-cg':
+@@ -1115,6 +1117,11 @@ class LogisticRegression(BaseEstimator, LinearClassifierMixin,
+         it returns only 1 element. For liblinear solver, only the maximum
+         number of iteration across all classes is given.
+ 
++        .. versionchanged:: 0.20
++
++            In SciPy <= 1.0.0 the number of lbfgs iterations may exceed
++            ``max_iter``. ``n_iter_`` will now report at most ``max_iter``.
++
+     See also
+     --------
+     SGDClassifier : incrementally trained logistic regression (when given
+diff --git a/sklearn/linear_model/tests/test_huber.py b/sklearn/linear_model/tests/test_huber.py
+index 08f4fdf..ca1092f 100644
+--- a/sklearn/linear_model/tests/test_huber.py
++++ b/sklearn/linear_model/tests/test_huber.py
+@@ -42,6 +42,13 @@ def test_huber_equals_lr_for_high_epsilon():
+     assert_almost_equal(huber.intercept_, lr.intercept_, 2)
+ 
+ 
++def test_huber_max_iter():
++    X, y = make_regression_with_outliers()
++    huber = HuberRegressor(max_iter=1)
++    huber.fit(X, y)
++    assert huber.n_iter_ == huber.max_iter
++
++
+ def test_huber_gradient():
+     # Test that the gradient calculated by _huber_loss_and_gradient is correct
+     rng = np.random.RandomState(1)
diff --git a/pkgs/development/python-modules/simpy/default.nix b/pkgs/development/python-modules/simpy/default.nix
new file mode 100644
index 000000000000..981b6693f7d4
--- /dev/null
+++ b/pkgs/development/python-modules/simpy/default.nix
@@ -0,0 +1,18 @@
+{ buildPythonPackage, fetchPypi, lib }:
+
+buildPythonPackage rec {
+  pname = "simpy";
+  version = "3.0.11";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0hqgxk3lggf21jq9lh8838cdl24mdkdnpzh0w4m28d0zn2wjb5nh";
+  };
+
+  meta = with lib; {
+    homepage = https://simpy.readthedocs.io/en/latest/;
+    description = "A process-based discrete-event simulation framework based on standard Python.";
+    license = [ licenses.mit ];
+    maintainers = with maintainers; [ shlevy ];
+  };
+}
diff --git a/pkgs/development/python-modules/trezor/default.nix b/pkgs/development/python-modules/trezor/default.nix
index 9a6a3c39eec1..0f96b100435a 100644
--- a/pkgs/development/python-modules/trezor/default.nix
+++ b/pkgs/development/python-modules/trezor/default.nix
@@ -1,11 +1,13 @@
 { lib, fetchPypi, buildPythonPackage,
-  protobuf, hidapi, ecdsa, mnemonic, requests, pyblake2, click, libusb1, rlp
+  protobuf, hidapi, ecdsa, mnemonic, requests, pyblake2, click, libusb1, rlp, isPy3k
 }:
 
 buildPythonPackage rec {
   pname = "trezor";
   version = "0.9.1";
 
+  disabled = !isPy3k;
+
   src = fetchPypi {
     inherit pname version;
     sha256 = "a481191011bade98f1e9f1201e7c72a83945050657bbc90dc4ac32dc8b8b46a4";
diff --git a/pkgs/development/python-modules/trollius/default.nix b/pkgs/development/python-modules/trollius/default.nix
index 7b61633a7fc7..6d43aa8da869 100644
--- a/pkgs/development/python-modules/trollius/default.nix
+++ b/pkgs/development/python-modules/trollius/default.nix
@@ -1,17 +1,14 @@
-{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, isPy26, isPyPy, mock, futures  }:
+{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, isPyPy, mock, futures  }:
 buildPythonPackage rec {
   pname = "trollius";
   version = "1.0.4";
-  name  = "${pname}-${version}";
-
-  disabled = isPy26;
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "0xny8y12x3wrflmyn6xi8a7n3m3ac80fgmgzphx5jbbaxkjcm148";
   };
 
-  buildInputs = [ mock ];
+  checkInputs = [ mock ];
 
   propagatedBuildInputs = lib.optionals (isPy27 || isPyPy) [ futures ];
 
diff --git a/pkgs/development/python-modules/uranium/default.nix b/pkgs/development/python-modules/uranium/default.nix
index 7be8f01f23c8..276ed481601c 100644
--- a/pkgs/development/python-modules/uranium/default.nix
+++ b/pkgs/development/python-modules/uranium/default.nix
@@ -2,7 +2,7 @@
 , pyqt5, numpy, scipy, libarcus, doxygen, gettext, pythonOlder }:
 
 buildPythonPackage rec {
-  version = "3.3.0";
+  version = "3.4.1";
   pname = "uranium";
   format = "other";
 
@@ -10,7 +10,7 @@ buildPythonPackage rec {
     owner = "Ultimaker";
     repo = "Uranium";
     rev = version;
-    sha256 = "1rg0l2blndnbdfcgkjc2r29cnjdm009rz8lnc225ilh9d7w1srbb";
+    sha256 = "1r6d65c9xfkn608k6wv3dprpks5h8g2v9mi4a67ifpzyw4y3f0rk";
   };
 
   disabled = pythonOlder "3.5.0";
diff --git a/pkgs/development/python-modules/vega_datasets/default.nix b/pkgs/development/python-modules/vega_datasets/default.nix
new file mode 100644
index 000000000000..a7b6c6865cca
--- /dev/null
+++ b/pkgs/development/python-modules/vega_datasets/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildPythonPackage, fetchPypi, pandas, pytest }:
+
+buildPythonPackage rec {
+  pname = "vega_datasets";
+  version = "0.5.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1fa672ba89ded093b30c6d59fce10aca3ac7c927df254e588da7b6d14f695181";
+  };
+
+  propagatedBuildInputs = [ pandas ];
+
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    py.test vega_datasets --doctest-modules
+  '';
+
+  meta = with lib; {
+    description = "A Python package for offline access to vega datasets";
+    homepage = https://github.com/altair-viz/vega_datasets;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/python-modules/wcwidth/default.nix b/pkgs/development/python-modules/wcwidth/default.nix
new file mode 100644
index 000000000000..fa993c593e1a
--- /dev/null
+++ b/pkgs/development/python-modules/wcwidth/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, buildPythonPackage }:
+
+buildPythonPackage rec {
+    name = "wcwidth-${version}";
+    version = "0.1.7";
+
+    src = fetchurl {
+      url = "mirror://pypi/w/wcwidth/${name}.tar.gz";
+      sha256 = "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx";
+    };
+
+    # Checks fail due to missing tox.ini file:
+    doCheck = false;
+
+    meta = with stdenv.lib; {
+      description = "Measures number of Terminal column cells of wide-character codes";
+      longDescription = ''
+        This API is mainly for Terminal Emulator implementors -- any Python
+        program that attempts to determine the printable width of a string on
+        a Terminal. It is implemented in python (no C library calls) and has
+        no 3rd-party dependencies.
+      '';
+      homepage = https://github.com/jquast/wcwidth;
+      license = licenses.mit;
+    };
+  }