aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/cheroot/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/cheroot/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/cheroot/default.nix63
1 files changed, 48 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/cheroot/default.nix b/nixpkgs/pkgs/development/python-modules/cheroot/default.nix
index 54c502b815c..5795b55d91b 100644
--- a/nixpkgs/pkgs/development/python-modules/cheroot/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/cheroot/default.nix
@@ -1,39 +1,72 @@
-{ stdenv, fetchPypi, buildPythonPackage, pythonAtLeast, isPy3k
-, more-itertools, six, setuptools_scm, setuptools-scm-git-archive
-, pytest, pytestcov, portend, pytest-testmon, pytest-mock
-, backports_unittest-mock, pyopenssl, requests, trustme, requests-unixsocket
-, backports_functools_lru_cache }:
-
-let inherit (stdenv) lib; in
+{ lib, stdenv, fetchPypi, buildPythonPackage, isPy3k
+, jaraco_text
+, more-itertools
+, portend
+, pyopenssl
+, pytestCheckHook
+, pytestcov
+, pytest-mock
+, pytest-testmon
+, requests
+, requests-toolbelt
+, requests-unixsocket
+, setuptools_scm
+, setuptools-scm-git-archive
+, six
+, trustme
+}:
buildPythonPackage rec {
pname = "cheroot";
- version = "8.2.1";
+ version = "8.4.5";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
- sha256 = "5b525b3e4a755adf78070ab54c1821fb860d4255a9317dba2b88eb2df2441cff";
+ sha256 = "b6c18caf5f79cdae668c35fc8309fc88ea4a964cce9e2ca8504fab13bcf57301";
};
nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ];
- propagatedBuildInputs = [ more-itertools six backports_functools_lru_cache ];
+ propagatedBuildInputs = [ more-itertools six ];
+
+ checkInputs = [
+ jaraco_text
+ portend
+ pyopenssl
+ pytestCheckHook
+ pytestcov
+ pytest-mock
+ pytest-testmon
+ requests
+ requests-toolbelt
+ requests-unixsocket
+ trustme
+ ];
- checkInputs = [ pytest pytestcov portend backports_unittest-mock pytest-mock pytest-testmon pyopenssl requests trustme requests-unixsocket ];
+ # avoid attempting to use 3 packages not available on nixpkgs
+ # (jaraco.apt, jaraco.context, yg.lockfile)
+ pytestFlagsArray = [ "--ignore=cheroot/test/test_wsgi.py" ];
# Disable doctest plugin because times out
# Disable xdist (-n arg) because it's incompatible with testmon
# Deselect test_bind_addr_unix on darwin because times out
# Deselect test_http_over_https_error on darwin because builtin cert fails
# Disable warnings-as-errors because of deprecation warnings from socks on python 3.7
- checkPhase = ''
- substituteInPlace pytest.ini --replace "--doctest-modules" "" --replace "-n auto" ""
- ${lib.optionalString (pythonAtLeast "3.7") "sed -i '/warnings/,+2d' pytest.ini"}
- pytest -k 'not tls' ${lib.optionalString stdenv.isDarwin "--deselect=cheroot/test/test_ssl.py::test_http_over_https_error --deselect=cheroot/test/test_server.py::test_bind_addr_unix"}
+ # adds many other pytest utilities which aren't necessary like linting
+ preCheck = ''
+ rm pytest.ini
'';
+ disabledTests= [
+ "tls" # touches network
+ "peercreds_unix_sock" # test urls no longer allowed
+ ] ++ lib.optionals stdenv.isDarwin [
+ "http_over_https_error"
+ "bind_addr_unix"
+ ];
+
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;