2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
2021-01-05 17:05:55 +00:00
|
|
|
, jaraco_functools
|
2020-07-18 16:06:22 +00:00
|
|
|
, jaraco_text
|
|
|
|
, more-itertools
|
|
|
|
, portend
|
|
|
|
, pyopenssl
|
|
|
|
, pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-cov
|
2020-07-18 16:06:22 +00:00
|
|
|
, pytest-mock
|
|
|
|
, 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";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "8.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "f137d03fd5155b1364bea557a7c98168665c239f6c8cedd8f80e81cdfac01567";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +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 = [
|
|
|
|
# install_requires
|
|
|
|
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
|
|
|
|
pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-cov
|
2020-07-18 16:06:22 +00:00
|
|
|
pytest-mock
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|