1{ lib 2, stdenv 3, buildPythonPackage 4, cheroot 5, fetchPypi 6, jaraco_collections 7, more-itertools 8, objgraph 9, path 10, portend 11, pytest-forked 12, pytest-services 13, pytestCheckHook 14, python-memcached 15, pythonAtLeast 16, pythonOlder 17, requests-toolbelt 18, routes 19, setuptools-scm 20, simplejson 21, zc_lockfile 22}: 23 24buildPythonPackage rec { 25 pname = "cherrypy"; 26 version = "18.8.0"; 27 format = "setuptools"; 28 29 disabled = pythonOlder "3.7"; 30 31 src = fetchPypi { 32 pname = "CherryPy"; 33 inherit version; 34 hash = "sha256-m0jPuoovFtW2QZzGV+bVHbAFujXF44JORyi7A7vH75s="; 35 }; 36 37 postPatch = '' 38 # Disable doctest plugin because times out 39 substituteInPlace pytest.ini \ 40 --replace "--doctest-modules" "-vvv" \ 41 --replace "-p pytest_cov" "" \ 42 --replace "--no-cov-on-fail" "" 43 sed -i "/--cov/d" pytest.ini 44 ''; 45 46 nativeBuildInputs = [ 47 setuptools-scm 48 ]; 49 50 propagatedBuildInputs = [ 51 cheroot 52 portend 53 more-itertools 54 zc_lockfile 55 jaraco_collections 56 ]; 57 58 checkInputs = [ 59 objgraph 60 path 61 pytest-forked 62 pytest-services 63 pytestCheckHook 64 requests-toolbelt 65 ]; 66 67 pytestFlagsArray = [ 68 "-W" 69 "ignore::DeprecationWarning" 70 ]; 71 72 disabledTests = [ 73 # Keyboard interrupt ends test suite run 74 "KeyboardInterrupt" 75 # daemonize and autoreload tests have issue with sockets within sandbox 76 "daemonize" 77 "Autoreload" 78 79 "test_antistampede" 80 "test_file_stream" 81 ] ++ lib.optionals stdenv.isDarwin [ 82 "test_block" 83 ]; 84 85 disabledTestPaths = lib.optionals stdenv.isDarwin [ 86 "cherrypy/test/test_config_server.py" 87 ]; 88 89 __darwinAllowLocalNetworking = true; 90 91 pythonImportsCheck = [ 92 "cherrypy" 93 ]; 94 95 passthru.optional-dependencies = { 96 json = [ simplejson ]; 97 memcached_session = [ python-memcached ]; 98 routes_dispatcher = [ routes ]; 99 # not packaged yet 100 xcgi = [ /* flup */ ]; 101 }; 102 103 meta = with lib; { 104 description = "Object-oriented HTTP framework"; 105 homepage = "https://www.cherrypy.org"; 106 license = licenses.bsd3; 107 maintainers = with maintainers; [ ]; 108 }; 109}