2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchPypi
|
2021-01-05 17:05:55 +00:00
|
|
|
, jaraco_functools
|
2020-07-18 16:06:22 +00:00
|
|
|
, jaraco_text
|
|
|
|
, more-itertools
|
|
|
|
, portend
|
|
|
|
, pyopenssl
|
2022-02-10 20:34:41 +00:00
|
|
|
, pypytools
|
2020-07-18 16:06:22 +00:00
|
|
|
, pytest-mock
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-07-18 16:06:22 +00:00
|
|
|
, requests
|
2020-08-20 17:08:02 +00:00
|
|
|
, requests-toolbelt
|
2020-07-18 16:06:22 +00:00
|
|
|
, requests-unixsocket
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-07-18 16:06:22 +00:00
|
|
|
, setuptools-scm-git-archive
|
|
|
|
, six
|
|
|
|
, trustme
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cheroot";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "8.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
hash = "sha256-NmrfbnyslVVIbC0b5il5kwIu/2+MRlXBRDJozKPwjiU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
setuptools-scm-git-archive
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jaraco_functools
|
2021-02-05 17:12:51 +00:00
|
|
|
more-itertools
|
|
|
|
six
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
checkInputs = [
|
|
|
|
jaraco_text
|
|
|
|
portend
|
|
|
|
pyopenssl
|
2022-02-10 20:34:41 +00:00
|
|
|
pypytools
|
2020-07-18 16:06:22 +00:00
|
|
|
pytest-mock
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
2020-07-18 16:06:22 +00:00
|
|
|
requests
|
2020-08-20 17:08:02 +00:00
|
|
|
requests-toolbelt
|
2020-07-18 16:06:22 +00:00
|
|
|
requests-unixsocket
|
|
|
|
trustme
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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
|
2020-12-07 07:45:13 +00:00
|
|
|
# Disable pytest-testmon because it doesn't work
|
2020-07-18 16:06:22 +00:00
|
|
|
# adds many other pytest utilities which aren't necessary like linting
|
|
|
|
preCheck = ''
|
|
|
|
rm pytest.ini
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
disabledTests = [
|
2020-07-18 16:06:22 +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-03-09 03:18:52 +00:00
|
|
|
disabledTestPaths = [
|
2021-02-05 17:12:51 +00:00
|
|
|
# avoid attempting to use 3 packages not available on nixpkgs
|
|
|
|
# (jaraco.apt, jaraco.context, yg.lockfile)
|
|
|
|
"cheroot/test/test_wsgi.py"
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"cheroot"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High-performance, pure-Python HTTP";
|
|
|
|
homepage = "https://github.com/cherrypy/cheroot";
|
|
|
|
license = licenses.mit;
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|