26 buildPythonPackage rec {
31 disabled = pythonOlder "3.7";
36 hash = "sha256-awbBkc5xqGRh8wVyoatX/8CfQxQ7qOQsEDx7M0ciDrE=";
40 # Replace distutils.spawn.find_executable with shutil.which, https://github.com/cherrypy/cherrypy/pull/2023
42 name = "remove-distutils.patch";
43 url = "https://github.com/cherrypy/cherrypy/commit/8a19dd5f1e712a326a3613b17e6fc900012ed09a.patch";
44 hash = "sha256-fXECX0CdU74usiq9GEkIG9CF+dueszblT4qOeF6B700=";
49 substituteInPlace pyproject.toml \
50 --replace-fail '"setuptools_scm_git_archive >= 1.1",' ""
51 # Disable doctest plugin because times out
52 substituteInPlace pytest.ini \
53 --replace-fail "--doctest-modules" "-vvv" \
54 --replace-fail "-p pytest_cov" "" \
55 --replace-fail "--no-cov-on-fail" ""
56 sed -i "/--cov/d" pytest.ini
63 propagatedBuildInputs = [
86 "ignore::DeprecationWarning"
90 # Keyboard interrupt ends test suite run
92 # daemonize and autoreload tests have issue with sockets within sandbox
100 "test_4_File_deletion"
101 ] ++ lib.optionals (pythonAtLeast "3.11") [
104 "test_HTTP10_KeepAlive"
105 "test_No_Message_Body"
106 "test_HTTP11_Timeout"
108 "test_malformed_header"
109 "test_no_content_length"
110 "test_post_filename_with_special_characters"
111 "test_post_multipart"
113 "test_1_Ram_Concurrency"
114 "test_2_File_Concurrency"
115 ] ++ lib.optionals stdenv.isDarwin [
119 disabledTestPaths = lib.optionals stdenv.isDarwin [
120 "cherrypy/test/test_config_server.py"
123 __darwinAllowLocalNetworking = true;
125 pythonImportsCheck = [
129 passthru.optional-dependencies = {
130 json = [ simplejson ];
131 memcached_session = [ python-memcached ];
132 routes_dispatcher = [ routes ];
135 xcgi = [ /* flup */ ];
139 description = "Object-oriented HTTP framework";
140 mainProgram = "cherryd";
141 homepage = "https://cherrypy.dev/";
142 changelog = "https://github.com/cherrypy/cherrypy/blob/v${version}/CHANGES.rst";
143 license = licenses.bsd3;
144 maintainers = with maintainers; [ ];