2021-01-05 23:45:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
2020-11-28 02:42:29 +00:00
|
|
|
, jaraco_functools
|
2020-06-22 22:43:09 +00:00
|
|
|
, jaraco_text
|
|
|
|
, more-itertools
|
|
|
|
, portend
|
|
|
|
, pyopenssl
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytestcov
|
|
|
|
, pytest-mock
|
|
|
|
, requests
|
2020-08-11 20:43:34 +00:00
|
|
|
, requests-toolbelt
|
2020-06-22 22:43:09 +00:00
|
|
|
, requests-unixsocket
|
|
|
|
, setuptools_scm
|
|
|
|
, setuptools-scm-git-archive
|
|
|
|
, six
|
|
|
|
, trustme
|
|
|
|
}:
|
2019-08-22 13:18:12 +00:00
|
|
|
|
2017-09-05 09:16:41 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cheroot";
|
2021-03-24 09:28:10 +00:00
|
|
|
version = "8.5.2";
|
2017-09-05 09:16:41 +00:00
|
|
|
|
2019-11-27 20:05:34 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2017-09-05 09:16:41 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-24 09:28:10 +00:00
|
|
|
sha256 = "f137d03fd5155b1364bea557a7c98168665c239f6c8cedd8f80e81cdfac01567";
|
2017-09-05 09:16:41 +00:00
|
|
|
};
|
|
|
|
|
2019-07-21 09:25:00 +00:00
|
|
|
nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ];
|
2018-07-30 05:50:54 +00:00
|
|
|
|
2020-11-28 02:42:29 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
# install_requires
|
|
|
|
jaraco_functools
|
|
|
|
|
2021-01-05 23:45:39 +00:00
|
|
|
more-itertools
|
|
|
|
six
|
2020-11-28 02:42:29 +00:00
|
|
|
];
|
2017-12-24 04:00:12 +00:00
|
|
|
|
2020-06-22 22:43:09 +00:00
|
|
|
checkInputs = [
|
|
|
|
jaraco_text
|
|
|
|
portend
|
|
|
|
pyopenssl
|
|
|
|
pytestCheckHook
|
|
|
|
pytestcov
|
|
|
|
pytest-mock
|
|
|
|
requests
|
2020-08-11 20:43:34 +00:00
|
|
|
requests-toolbelt
|
2020-06-22 22:43:09 +00:00
|
|
|
requests-unixsocket
|
|
|
|
trustme
|
|
|
|
];
|
2017-09-05 09:16:41 +00:00
|
|
|
|
2019-07-21 09:25:00 +00:00
|
|
|
# Disable doctest plugin because times out
|
2019-08-22 13:18:12 +00:00
|
|
|
# Disable xdist (-n arg) because it's incompatible with testmon
|
2019-07-21 09:25:00 +00: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 13:18:12 +00:00
|
|
|
# Disable warnings-as-errors because of deprecation warnings from socks on python 3.7
|
2020-12-01 00:53:50 +00:00
|
|
|
# Disable pytest-testmon because it doesn't work
|
2020-06-22 22:43:09 +00:00
|
|
|
# adds many other pytest utilities which aren't necessary like linting
|
|
|
|
preCheck = ''
|
|
|
|
rm pytest.ini
|
2017-09-05 09:16:41 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-05 23:45:39 +00:00
|
|
|
disabledTests = [
|
2020-06-22 22:43:09 +00:00
|
|
|
"tls" # touches network
|
|
|
|
"peercreds_unix_sock" # test urls no longer allowed
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"http_over_https_error"
|
|
|
|
"bind_addr_unix"
|
|
|
|
];
|
|
|
|
|
2021-02-14 22:54:55 +00:00
|
|
|
disabledTestPaths = [
|
2021-01-05 23:45:39 +00:00
|
|
|
# avoid attempting to use 3 packages not available on nixpkgs
|
|
|
|
# (jaraco.apt, jaraco.context, yg.lockfile)
|
|
|
|
"cheroot/test/test_wsgi.py"
|
|
|
|
];
|
|
|
|
|
2019-09-15 23:37:19 +00:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2019-08-22 13:18:12 +00:00
|
|
|
meta = with lib; {
|
2017-09-05 09:16:41 +00:00
|
|
|
description = "High-performance, pure-Python HTTP";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/cherrypy/cheroot";
|
2017-09-05 09:16:41 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|