20 buildPythonPackage rec {
23 format = "setuptools";
25 disabled = pythonOlder "3.7";
28 inherit pname version;
29 hash = "sha256-WcShh3/vmWmzw8CAyqrzd+J4CRlDeFP8DTKp30CzEfA=";
32 # remove setuptools-scm-git-archive dependency
33 # https://github.com/cherrypy/cheroot/commit/f0c51af263e20f332c6f675aa90ec6705ae4f5d1
34 # there is a difference between the github source and the pypi tarball source,
35 # and it is not easy to apply patches.
37 substituteInPlace pyproject.toml \
38 --replace '"setuptools_scm_git_archive>=1.1",' ""
39 substituteInPlace setup.cfg \
40 --replace "setuptools_scm_git_archive>=1.0" ""
47 propagatedBuildInputs = [
64 # Disable doctest plugin because times out
65 # Disable xdist (-n arg) because it's incompatible with testmon
66 # Deselect test_bind_addr_unix on darwin because times out
67 # Deselect test_http_over_https_error on darwin because builtin cert fails
68 # Disable warnings-as-errors because of deprecation warnings from socks on python 3.7
69 # Disable pytest-testmon because it doesn't work
70 # adds many other pytest utilities which aren't necessary like linting
76 "tls" # touches network
77 "peercreds_unix_sock" # test urls no longer allowed
78 ] ++ lib.optionals stdenv.isDarwin [
79 "http_over_https_error"
85 # avoid attempting to use 3 packages not available on nixpkgs
86 # (jaraco.apt, jaraco.context, yg.lockfile)
87 "cheroot/test/test_wsgi.py"
89 "cheroot/test/test_ssl.py"
92 pythonImportsCheck = [
96 # Some of the tests use localhost networking.
97 __darwinAllowLocalNetworking = true;
100 description = "High-performance, pure-Python HTTP";
101 mainProgram = "cheroot";
102 homepage = "https://github.com/cherrypy/cheroot";
103 license = licenses.mit;
104 maintainers = with maintainers; [ ];