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