evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / cherrypy / default.nix
blob7f3bd134f29fcd5bd3ae067b4d5aca9fc83dd11a
2   lib,
3   stdenv,
4   buildPythonPackage,
5   cheroot,
6   fetchPypi,
7   jaraco-collections,
8   more-itertools,
9   objgraph,
10   path,
11   portend,
12   pyopenssl,
13   pytest-forked,
14   pytest-services,
15   pytestCheckHook,
16   python-memcached,
17   pythonAtLeast,
18   pythonOlder,
19   requests-toolbelt,
20   routes,
21   setuptools-scm,
22   simplejson,
23   zc-lockfile,
26 buildPythonPackage rec {
27   pname = "cherrypy";
28   version = "18.10.0";
29   pyproject = true;
31   disabled = pythonOlder "3.7";
33   src = fetchPypi {
34     inherit pname version;
35     hash = "sha256-bHDnjuETAOiyHAdnxUKuaxAqScrFz9Tj4xPXu5B8WJE=";
36   };
38   postPatch = ''
39     # Disable doctest plugin because times out
40     substituteInPlace pytest.ini \
41       --replace-fail "--doctest-modules" "-vvv" \
42       --replace-fail "-p pytest_cov" "" \
43       --replace-fail "--no-cov-on-fail" ""
44     sed -i "/--cov/d" pytest.ini
45   '';
47   build-system = [ setuptools-scm ];
49   dependencies = [
50     cheroot
51     jaraco-collections
52     more-itertools
53     portend
54     zc-lockfile
55   ];
57   nativeCheckInputs = [
58     objgraph
59     path
60     pytest-forked
61     pytest-services
62     pytestCheckHook
63     requests-toolbelt
64   ];
66   preCheck = ''
67     export CI=true
68   '';
70   pytestFlagsArray = [
71     "-W"
72     "ignore::DeprecationWarning"
73   ];
75   disabledTests =
76     [
77       # Keyboard interrupt ends test suite run
78       "KeyboardInterrupt"
79       # daemonize and autoreload tests have issue with sockets within sandbox
80       "daemonize"
81       "Autoreload"
83       "test_antistampede"
84       "test_file_stream"
85       "test_basic_request"
86       "test_3_Redirect"
87       "test_4_File_deletion"
88     ]
89     ++ lib.optionals (pythonAtLeast "3.11") [
90       "testErrorHandling"
91       "testHookErrors"
92       "test_HTTP10_KeepAlive"
93       "test_No_Message_Body"
94       "test_HTTP11_Timeout"
95       "testGzip"
96       "test_malformed_header"
97       "test_no_content_length"
98       "test_post_filename_with_special_characters"
99       "test_post_multipart"
100       "test_iterator"
101       "test_1_Ram_Concurrency"
102       "test_2_File_Concurrency"
103     ]
104     ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_block" ];
106   disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
107     "cherrypy/test/test_config_server.py"
108   ];
110   __darwinAllowLocalNetworking = true;
112   pythonImportsCheck = [ "cherrypy" ];
114   optional-dependencies = {
115     json = [ simplejson ];
116     memcached_session = [ python-memcached ];
117     routes_dispatcher = [ routes ];
118     ssl = [ pyopenssl ];
119     # not packaged yet
120     xcgi = [
121       # flup
122     ];
123   };
125   meta = with lib; {
126     description = "Object-oriented HTTP framework";
127     mainProgram = "cherryd";
128     homepage = "https://cherrypy.dev/";
129     changelog = "https://github.com/cherrypy/cherrypy/blob/v${version}/CHANGES.rst";
130     license = licenses.bsd3;
131     maintainers = [ ];
132   };