2019-07-21 10:25:00 +01:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage
|
|
|
|
, more-itertools, six, setuptools_scm, setuptools-scm-git-archive
|
|
|
|
, pytest, pytestcov, portend, pytest-testmon, pytest-mock
|
|
|
|
, backports_unittest-mock, pyopenssl, requests, trustme, requests-unixsocket
|
2018-06-28 08:35:58 +01:00
|
|
|
, backports_functools_lru_cache }:
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cheroot";
|
2019-07-21 10:25:00 +01:00
|
|
|
version = "6.5.5";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-07-21 10:25:00 +01:00
|
|
|
sha256 = "f6a85e005adb5bc5f3a92b998ff0e48795d4d98a0fbb7edde47a7513d4100601";
|
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
|
|
|
|
|
|
|
propagatedBuildInputs = [ more-itertools six backports_functools_lru_cache ];
|
2017-12-24 04:00:12 +00:00
|
|
|
|
2019-07-21 10:25:00 +01:00
|
|
|
checkInputs = [ pytest pytestcov portend backports_unittest-mock pytest-mock pytest-testmon pyopenssl requests trustme requests-unixsocket ];
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2019-07-21 10:25:00 +01:00
|
|
|
# Disable doctest plugin because times out
|
|
|
|
# Deselect test_bind_addr_unix on darwin because times out
|
|
|
|
# Deselect test_http_over_https_error on darwin because builtin cert fails
|
2017-09-05 10:16:41 +01:00
|
|
|
checkPhase = ''
|
2019-07-21 10:25:00 +01:00
|
|
|
substituteInPlace pytest.ini --replace "--doctest-modules" ""
|
|
|
|
pytest ${stdenv.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"}
|
2017-09-05 10:16:41 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "High-performance, pure-Python HTTP";
|
|
|
|
homepage = https://github.com/cherrypy/cheroot;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|