about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Schütz <rschuetz17@gmail.com>2019-03-22 10:59:38 +0100
committerGitHub <noreply@github.com>2019-03-22 10:59:38 +0100
commit22bb090ed184784d7baca1b21957e8405bf631d4 (patch)
tree29187f7b6d3e6f95ba692b3f6705395343fdc252
parent07b42ccf2de451342982b550657636d891c4ba35 (diff)
parentdc884633a4fa8c5700850a4c9976fa1d0563d0b4 (diff)
downloadnixlib-22bb090ed184784d7baca1b21957e8405bf631d4.tar
nixlib-22bb090ed184784d7baca1b21957e8405bf631d4.tar.gz
nixlib-22bb090ed184784d7baca1b21957e8405bf631d4.tar.bz2
nixlib-22bb090ed184784d7baca1b21957e8405bf631d4.tar.lz
nixlib-22bb090ed184784d7baca1b21957e8405bf631d4.tar.xz
nixlib-22bb090ed184784d7baca1b21957e8405bf631d4.tar.zst
nixlib-22bb090ed184784d7baca1b21957e8405bf631d4.zip
Merge pull request #58035 from dotlambda/python-fixes
pythonPackages: multiple fixes
-rw-r--r--pkgs/development/python-modules/envs/default.nix5
-rw-r--r--pkgs/development/python-modules/pytest-server-fixtures/default.nix8
-rw-r--r--pkgs/development/python-modules/python-mapnik/default.nix49
-rw-r--r--pkgs/development/python-modules/retry/default.nix43
-rw-r--r--pkgs/development/python-modules/suds-jurko/default.nix10
-rw-r--r--pkgs/development/python-modules/tilestache/default.nix3
-rw-r--r--pkgs/top-level/python-packages.nix2
7 files changed, 90 insertions, 30 deletions
diff --git a/pkgs/development/python-modules/envs/default.nix b/pkgs/development/python-modules/envs/default.nix
index e39292049da0..600cb3b0320e 100644
--- a/pkgs/development/python-modules/envs/default.nix
+++ b/pkgs/development/python-modules/envs/default.nix
@@ -1,5 +1,6 @@
 { lib, buildPythonPackage, fetchPypi
-, click, jinja2, terminaltables }:
+, mock, jinja2, click, terminaltables
+}:
 
 buildPythonPackage rec {
   pname = "envs";
@@ -10,7 +11,7 @@ buildPythonPackage rec {
     sha256 = "ccf5cd85ddb8ed335e39ed8a22e0d23658f5a6d7da430f225e6f750c6f50ae42";
   };
 
-  checkInputs = [ click jinja2 terminaltables ];
+  checkInputs = [ mock jinja2 click terminaltables ];
 
   meta = with lib; {
     description = "Easy access to environment variables from Python";
diff --git a/pkgs/development/python-modules/pytest-server-fixtures/default.nix b/pkgs/development/python-modules/pytest-server-fixtures/default.nix
index df34c3361d07..98cae527672f 100644
--- a/pkgs/development/python-modules/pytest-server-fixtures/default.nix
+++ b/pkgs/development/python-modules/pytest-server-fixtures/default.nix
@@ -1,6 +1,6 @@
 { stdenv, buildPythonPackage, fetchPypi
-, pytest, setuptools-git, pytest-shutil, pytest-fixture-config, psutil
-, requests, future }:
+, pytest_3, pytest-shutil, pytest-fixture-config, psutil
+, requests, future, retry }:
 
 buildPythonPackage rec {
   pname = "pytest-server-fixtures";
@@ -11,8 +11,8 @@ buildPythonPackage rec {
     sha256 = "c89f9532f62cf851489082ece1ec692b6ed5b0f88f20823bea25e2a963ebee8f";
   };
 
-  buildInputs = [ pytest ];
-  propagatedBuildInputs = [ setuptools-git pytest-shutil pytest-fixture-config psutil requests future ];
+  buildInputs = [ pytest_3 ];
+  propagatedBuildInputs = [ pytest-shutil pytest-fixture-config psutil requests future retry ];
 
   # RuntimeError: Unable to find a free server number to start Xvfb
   doCheck = false;
diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix
index 692bbe4bcd89..02097d75ac87 100644
--- a/pkgs/development/python-modules/python-mapnik/default.nix
+++ b/pkgs/development/python-modules/python-mapnik/default.nix
@@ -8,7 +8,16 @@
 , pycairo
 }:
 
-buildPythonPackage rec {
+let
+  boost = pkgs.boost.override {
+    enablePython = true;
+    inherit python;
+  };
+  mapnik = pkgs.mapnik.override {
+    inherit python boost;
+  };
+
+in buildPythonPackage rec {
   pname = "python-mapnik";
   version = "3.0.16";
 
@@ -28,25 +37,25 @@ buildPythonPackage rec {
     export BOOST_THREAD_LIB="boost_thread"
     export BOOST_SYSTEM_LIB="boost_system"
   '';
-  buildInputs = with pkgs; [
-      (boost.override {
-        enablePython = true;
-        inherit python;
-      })
-      (mapnik.override {
-        inherit python;
-        boost = (boost.override { enablePython = true; inherit python; });
-      })
-      cairo
-      harfbuzz
-      icu
-      libjpeg
-      libpng
-      libtiff
-      libwebp
-      proj
-      zlib
-    ];
+
+  nativeBuildInputs = [
+    mapnik # for mapnik_config
+  ];
+
+  buildInputs = [
+    mapnik
+    boost
+  ] ++ (with pkgs; [
+    cairo
+    harfbuzz
+    icu
+    libjpeg
+    libpng
+    libtiff
+    libwebp
+    proj
+    zlib
+  ]);
   propagatedBuildInputs = [ pillow pycairo ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/python-modules/retry/default.nix b/pkgs/development/python-modules/retry/default.nix
new file mode 100644
index 000000000000..a4743dcbfe46
--- /dev/null
+++ b/pkgs/development/python-modules/retry/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pbr
+, decorator
+, py
+, mock
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "retry";
+  version = "0.9.2";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "f8bfa8b99b69c4506d6f5bd3b0aabf77f98cdb17f3c9fc3f5ca820033336fba4";
+  };
+
+  nativeBuildInputs = [
+    pbr
+  ];
+
+  propagatedBuildInputs = [
+    decorator
+    py
+  ];
+
+  checkInputs = [
+    mock
+    pytest
+  ];
+
+  checkPhase = ''
+    pytest
+  '';
+
+  meta = with lib; {
+    description = "Easy to use retry decorator";
+    homepage = https://github.com/invl/retry;
+    license = licenses.asl20;
+  };
+}
diff --git a/pkgs/development/python-modules/suds-jurko/default.nix b/pkgs/development/python-modules/suds-jurko/default.nix
index 5459a39fc1f1..efb8383c8fdc 100644
--- a/pkgs/development/python-modules/suds-jurko/default.nix
+++ b/pkgs/development/python-modules/suds-jurko/default.nix
@@ -1,7 +1,7 @@
 { stdenv
 , buildPythonPackage
 , fetchPypi
-, pytest
+, pytest_3
 , isPyPy
 }:
 
@@ -16,9 +16,13 @@ buildPythonPackage rec {
     sha256 = "1s4radwf38kdh3jrn5acbidqlr66sx786fkwi0rgq61hn4n2bdqw";
   };
 
-  buildInputs = [ pytest ];
+  checkInputs = [ pytest_3 ];
 
-  doCheck = false; # v0.6 is broken with recent pytest 4.x
+  postPatch = ''
+    # fails
+    substituteInPlace tests/test_transport_http.py \
+      --replace "test_sending_unicode_data" "noop"
+  '';
 
   meta = with stdenv.lib; {
     description = "Lightweight SOAP client (Jurko's fork)";
diff --git a/pkgs/development/python-modules/tilestache/default.nix b/pkgs/development/python-modules/tilestache/default.nix
index 097a7368c835..2b0fc68ca4c4 100644
--- a/pkgs/development/python-modules/tilestache/default.nix
+++ b/pkgs/development/python-modules/tilestache/default.nix
@@ -16,7 +16,8 @@ buildPythonPackage rec {
   disabled = !isPy27;
 
   src = fetchPypi {
-    inherit pname version;
+    pname = "TileStache";
+    inherit version;
     sha256 = "11e15dd85501345bcfeb18dce5b1c8fb74ac8d867df2520afe0eefe1edd85f27";
   };
 
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index df0b374689c0..20b77c87108c 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4092,6 +4092,8 @@ in {
 
   restructuredtext_lint = callPackage ../development/python-modules/restructuredtext_lint { };
 
+  retry = callPackage ../development/python-modules/retry { };
+
   robomachine = callPackage ../development/python-modules/robomachine { };
 
   robotframework = callPackage ../development/python-modules/robotframework { };