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