Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 55 lines 1.6 kB view raw
1{ stdenv, buildPythonPackage, fetchPypi, isPy3k 2, setuptools_scm 3, cheroot, portend, more-itertools, zc_lockfile, routes 4, objgraph, pytest, pytestcov, pathpy, requests_toolbelt, pytest-services 5, fetchpatch 6}: 7 8buildPythonPackage rec { 9 pname = "cherrypy"; 10 version = "18.3.0"; 11 12 disabled = !isPy3k; 13 14 src = fetchPypi { 15 pname = "CherryPy"; 16 inherit version; 17 sha256 = "0q6cs4vrv0rwim4byxfizrlp4h6hmwg3n4baz0ga66vvgiz6hgk8"; 18 }; 19 20 # Remove patches once 88d2163 and 713f672 21 # become part of a release - they're currently only present in master. 22 # ref: https://github.com/cherrypy/cherrypy/pull/1820 23 patches = [ 24 (fetchpatch { 25 name = "test_HTTP11_Timeout.patch"; 26 url = "https://github.com/cherrypy/cherrypy/commit/88d21630f68090c56d07000cabb6df4f1b612a71.patch"; 27 sha256 = "1i6a3qs3ijyd9rgsxb8axigkzdlmr5sl3ljif9rvn0d90211bzwh"; 28 }) 29 ]; 30 31 propagatedBuildInputs = [ 32 # required 33 cheroot portend more-itertools zc_lockfile 34 # optional 35 routes 36 ]; 37 38 nativeBuildInputs = [ setuptools_scm ]; 39 40 checkInputs = [ 41 objgraph pytest pytestcov pathpy requests_toolbelt pytest-services 42 ]; 43 44 # Disable doctest plugin because times out 45 checkPhase = '' 46 substituteInPlace pytest.ini --replace "--doctest-modules" "" 47 pytest --deselect=cherrypy/test/test_static.py::StaticTest::test_null_bytes ${stdenv.lib.optionalString stdenv.isDarwin "--deselect=cherrypy/test/test_bus.py::BusMethodTests::test_block"} 48 ''; 49 50 meta = with stdenv.lib; { 51 homepage = https://www.cherrypy.org; 52 description = "A pythonic, object-oriented HTTP framework"; 53 license = licenses.bsd3; 54 }; 55}