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