2020-06-22 23:43:09 +01:00
|
|
|
{ lib, stdenv, fetchPypi, buildPythonPackage, isPy3k
|
|
|
|
, jaraco_text
|
|
|
|
, more-itertools
|
|
|
|
, portend
|
|
|
|
, pyopenssl
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytestcov
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-testmon
|
|
|
|
, requests
|
|
|
|
, requests-unixsocket
|
|
|
|
, setuptools_scm
|
|
|
|
, setuptools-scm-git-archive
|
|
|
|
, six
|
|
|
|
, trustme
|
|
|
|
}:
|
2019-08-22 14:18:12 +01:00
|
|
|
|
2017-09-05 10:16:41 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cheroot";
|
2020-06-06 07:47:01 +01:00
|
|
|
version = "8.3.0";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2019-11-27 20:05:34 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2017-09-05 10:16:41 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-06 07:47:01 +01:00
|
|
|
sha256 = "a0577e1f28661727d472671a7cc4e0c12ea0cbc5220265e70f00a8b8cb628931";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2019-07-21 10:25:00 +01:00
|
|
|
nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ];
|
2018-07-30 06:50:54 +01:00
|
|
|
|
2020-06-22 23:43:09 +01:00
|
|
|
propagatedBuildInputs = [ more-itertools six ];
|
2017-12-24 04:00:12 +00:00
|
|
|
|
2020-06-22 23:43:09 +01:00
|
|
|
checkInputs = [
|
|
|
|
jaraco_text
|
|
|
|
portend
|
|
|
|
pyopenssl
|
|
|
|
pytestCheckHook
|
|
|
|
pytestcov
|
|
|
|
pytest-mock
|
|
|
|
pytest-testmon
|
|
|
|
requests
|
|
|
|
requests-unixsocket
|
|
|
|
trustme
|
|
|
|
];
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2019-07-21 10:25:00 +01:00
|
|
|
# Disable doctest plugin because times out
|
2019-08-22 14:18:12 +01:00
|
|
|
# Disable xdist (-n arg) because it's incompatible with testmon
|
2019-07-21 10:25:00 +01:00
|
|
|
# Deselect test_bind_addr_unix on darwin because times out
|
|
|
|
# Deselect test_http_over_https_error on darwin because builtin cert fails
|
2019-08-22 14:18:12 +01:00
|
|
|
# Disable warnings-as-errors because of deprecation warnings from socks on python 3.7
|
2020-06-22 23:43:09 +01:00
|
|
|
# adds many other pytest utilities which aren't necessary like linting
|
|
|
|
preCheck = ''
|
|
|
|
rm pytest.ini
|
2017-09-05 10:16:41 +01:00
|
|
|
'';
|
|
|
|
|
2020-06-22 23:43:09 +01:00
|
|
|
disabledTests= [
|
|
|
|
"tls" # touches network
|
|
|
|
"peercreds_unix_sock" # test urls no longer allowed
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"http_over_https_error"
|
|
|
|
"bind_addr_unix"
|
|
|
|
];
|
|
|
|
|
2019-09-16 00:37:19 +01:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2019-08-22 14:18:12 +01:00
|
|
|
meta = with lib; {
|
2017-09-05 10:16:41 +01:00
|
|
|
description = "High-performance, pure-Python HTTP";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/cherrypy/cheroot";
|
2017-09-05 10:16:41 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|