2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, cheroot
|
|
|
|
, fetchPypi
|
2020-08-20 17:08:02 +00:00
|
|
|
, jaraco_collections
|
2022-01-13 20:06:32 +00:00
|
|
|
, more-itertools
|
|
|
|
, objgraph
|
2022-04-27 09:35:20 +00:00
|
|
|
, path
|
2022-01-13 20:06:32 +00:00
|
|
|
, portend
|
2023-03-15 16:39:30 +00:00
|
|
|
, pyopenssl
|
2022-01-13 20:06:32 +00:00
|
|
|
, pytest-forked
|
|
|
|
, pytest-services
|
|
|
|
, pytestCheckHook
|
2022-06-26 10:26:21 +00:00
|
|
|
, python-memcached
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
|
|
|
, requests-toolbelt
|
|
|
|
, routes
|
|
|
|
, setuptools-scm
|
|
|
|
, simplejson
|
|
|
|
, zc_lockfile
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cherrypy";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "18.8.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabled = pythonOlder "3.7" || pythonAtLeast "3.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "CherryPy";
|
|
|
|
inherit version;
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-m0jPuoovFtW2QZzGV+bVHbAFujXF44JORyi7A7vH75s=";
|
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 \
|
|
|
|
--replace "--doctest-modules" "-vvv" \
|
|
|
|
--replace "-p pytest_cov" "" \
|
|
|
|
--replace "--no-cov-on-fail" ""
|
|
|
|
sed -i "/--cov/d" pytest.ini
|
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
2021-03-20 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
cheroot
|
|
|
|
portend
|
|
|
|
more-itertools
|
|
|
|
zc_lockfile
|
2020-08-20 17:08:02 +00:00
|
|
|
jaraco_collections
|
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"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Keyboard interrupt ends test suite run
|
|
|
|
"KeyboardInterrupt"
|
|
|
|
# daemonize and autoreload tests have issue with sockets within sandbox
|
|
|
|
"daemonize"
|
|
|
|
"Autoreload"
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
"test_antistampede"
|
|
|
|
"test_file_stream"
|
2023-01-20 10:41:00 +00:00
|
|
|
"test_basic_request"
|
|
|
|
"test_3_Redirect"
|
|
|
|
"test_4_File_deletion"
|
2022-01-13 20:06:32 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"test_block"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
|
|
|
"cherrypy/test/test_config_server.py"
|
|
|
|
];
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"cherrypy"
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
xcgi = [ /* flup */ ];
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
description = "Object-oriented HTTP framework";
|
2022-11-27 09:42:12 +00:00
|
|
|
homepage = "https://cherrypy.dev/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2022-01-13 20:06:32 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|