2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
cheroot,
|
|
|
|
fetchPypi,
|
|
|
|
jaraco-collections,
|
|
|
|
more-itertools,
|
|
|
|
objgraph,
|
|
|
|
path,
|
|
|
|
portend,
|
|
|
|
pyopenssl,
|
|
|
|
pytest-forked,
|
|
|
|
pytest-services,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-memcached,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
requests-toolbelt,
|
|
|
|
routes,
|
|
|
|
setuptools-scm,
|
|
|
|
simplejson,
|
|
|
|
zc-lockfile,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cherrypy";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "18.10.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-07-27 06:49:29 +00:00
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-bHDnjuETAOiyHAdnxUKuaxAqScrFz9Tj4xPXu5B8WJE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Disable doctest plugin because times out
|
|
|
|
substituteInPlace pytest.ini \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "--doctest-modules" "-vvv" \
|
|
|
|
--replace-fail "-p pytest_cov" "" \
|
|
|
|
--replace-fail "--no-cov-on-fail" ""
|
2022-08-12 12:06:08 +00:00
|
|
|
sed -i "/--cov/d" pytest.ini
|
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools-scm ];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2022-01-13 20:06:32 +00:00
|
|
|
cheroot
|
2024-04-21 15:54:59 +00:00
|
|
|
jaraco-collections
|
2022-01-13 20:06:32 +00:00
|
|
|
more-itertools
|
2024-04-21 15:54:59 +00:00
|
|
|
portend
|
2024-01-25 14:12:00 +00:00
|
|
|
zc-lockfile
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
objgraph
|
2022-04-27 09:35:20 +00:00
|
|
|
path
|
2022-01-13 20:06:32 +00:00
|
|
|
pytest-forked
|
|
|
|
pytest-services
|
|
|
|
pytestCheckHook
|
|
|
|
requests-toolbelt
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
preCheck = ''
|
|
|
|
export CI=true
|
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# Keyboard interrupt ends test suite run
|
|
|
|
"KeyboardInterrupt"
|
|
|
|
# daemonize and autoreload tests have issue with sockets within sandbox
|
|
|
|
"daemonize"
|
|
|
|
"Autoreload"
|
|
|
|
|
|
|
|
"test_antistampede"
|
|
|
|
"test_file_stream"
|
|
|
|
"test_basic_request"
|
|
|
|
"test_3_Redirect"
|
|
|
|
"test_4_File_deletion"
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
"testErrorHandling"
|
|
|
|
"testHookErrors"
|
|
|
|
"test_HTTP10_KeepAlive"
|
|
|
|
"test_No_Message_Body"
|
|
|
|
"test_HTTP11_Timeout"
|
|
|
|
"testGzip"
|
|
|
|
"test_malformed_header"
|
|
|
|
"test_no_content_length"
|
|
|
|
"test_post_filename_with_special_characters"
|
|
|
|
"test_post_multipart"
|
|
|
|
"test_iterator"
|
|
|
|
"test_1_Ram_Concurrency"
|
|
|
|
"test_2_File_Concurrency"
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_block" ];
|
2024-06-05 15:53:02 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
"cherrypy/test/test_config_server.py"
|
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "cherrypy" ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
json = [ simplejson ];
|
|
|
|
memcached_session = [ python-memcached ];
|
|
|
|
routes_dispatcher = [ routes ];
|
2023-03-15 16:39:30 +00:00
|
|
|
ssl = [ pyopenssl ];
|
2022-06-26 10:26:21 +00:00
|
|
|
# not packaged yet
|
2024-06-05 15:53:02 +00:00
|
|
|
xcgi = [
|
|
|
|
# flup
|
|
|
|
];
|
2022-06-26 10:26:21 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
description = "Object-oriented HTTP framework";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cherryd";
|
2022-11-27 09:42:12 +00:00
|
|
|
homepage = "https://cherrypy.dev/";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/cherrypy/cherrypy/blob/v${version}/CHANGES.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|