about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/urllib3/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/urllib3/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/urllib3/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/urllib3/default.nix b/nixpkgs/pkgs/development/python-modules/urllib3/default.nix
new file mode 100644
index 000000000000..af0066ddc74d
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/urllib3/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, buildPythonPackage, fetchPypi
+, pytest, mock, tornado, pyopenssl, cryptography
+, idna, certifi, ipaddress, pysocks }:
+
+buildPythonPackage rec {
+  pname = "urllib3";
+  version = "1.24.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "de9529817c93f27c8ccbfead6985011db27bd0ddfcdb2d86f3f663385c6a9c22";
+  };
+
+  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;
+
+  checkInputs = [ pytest mock tornado ];
+  propagatedBuildInputs = [ pyopenssl cryptography idna certifi ipaddress pysocks ];
+
+  meta = with stdenv.lib; {
+    description = "Powerful, sanity-friendly HTTP client for Python";
+    homepage = https://github.com/shazow/urllib3;
+    license = licenses.mit;
+  };
+}