@@ -1,73 +1,99 @@
1−{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k
2−, setuptools-scm
3−, cheroot, portend, more-itertools, zc_lockfile, routes
1+{ lib
2+, stdenv
3+, buildPythonPackage
4+, cheroot
5+, fetchPypi
46, jaraco_collections
5−, objgraph, pytest, pytest-cov, pathpy, requests-toolbelt, pytest-services
6−, fetchpatch
7+, more-itertools
8+, objgraph
9+, pathpy
10+, portend
11+, pytest-forked
12+, pytest-services
13+, pytestCheckHook
14+, pythonAtLeast
15+, pythonOlder
16+, requests-toolbelt
17+, routes
18+, setuptools-scm
19+, simplejson
20+, zc_lockfile
721}:
822
923buildPythonPackage rec {
1024 pname = "cherrypy";
11− version = "18.6.0";
25+ version = "18.6.1";
26+ format = "setuptools";
1227
13− disabled = !isPy3k;
28+ disabled = pythonOlder "3.7";
1429
1530 src = fetchPypi {
1631 pname = "CherryPy";
1732 inherit version;
18− sha256 = "16f410izp2c4qhn4n3l5l3qirmkf43h2amjqms8hkl0shgfqwq2n";
33+ hash = "sha256-8z6HKG57PjCeBOciXY5JOC2dd3PmCSJB1/YTiTxWNJU=";
1934 };
2035
21− patches = [
22− # 1/3 Fix compatibility with pytest 6. Will be part of the next release after 18.6
23− (fetchpatch {
24− url = "https://github.com/cherrypy/cherrypy/pull/1897/commits/59c0e19d7df8680e36afc96756dce72435121448.patch";
25− sha256 = "1jachbvp505gndccdhny0c3grzdrmvmbzq4kw55jx93ay94ni6p0";
26− })
27− # 2/3 Fix compatibility with pytest 6. Will be part of the next release after 18.6
28− (fetchpatch {
29− url = "https://github.com/cherrypy/cherrypy/pull/1897/commits/4a6287b73539adcb7b0ae72d69644a1ced1f7eaa.patch";
30− sha256 = "0nz40qmgxknkbjsdzfzcqfxdsmsxx3v104fb0h04yvs76mqvw3i4";
31− })
32− # 3/3 Fix compatibility with pytest 6. Will be part of the next release after 18.6
33− (fetchpatch {
34− url = "https://github.com/cherrypy/cherrypy/commit/3bae7f06868553b006915f05ff14d86163f59a7d.patch";
35− sha256 = "1z0bv23ybyw87rf1i8alsdi3gc2bzmdj9d0kjsghdkvi3zdp4n8q";
36− })
36+ nativeBuildInputs = [
37+ setuptools-scm
3738 ];
3839
39− nativeBuildInputs = [ setuptools-scm ];
40−
4140 propagatedBuildInputs = [
4241 # required
43− cheroot portend more-itertools zc_lockfile
42+ cheroot
43+ portend
44+ more-itertools
45+ zc_lockfile
4446 jaraco_collections
4547 # optional
4648 routes
49+ simplejson
4750 ];
4851
4952 checkInputs = [
50− objgraph pytest pytest-cov pathpy requests-toolbelt pytest-services
53+ objgraph
54+ pathpy
55+ pytest-forked
56+ pytest-services
57+ pytestCheckHook
58+ requests-toolbelt
5159 ];
5260
53− # Keyboard interrupt ends test suite run
54− # daemonize and autoreload tests have issue with sockets within sandbox
55− # Disable doctest plugin because times out
56− checkPhase = ''
57− substituteInPlace pytest.ini --replace "--doctest-modules" ""
58− pytest \
59− -k 'not KeyboardInterrupt and not daemonize and not Autoreload' \
60− --deselect=cherrypy/test/test_static.py::StaticTest::test_null_bytes \
61− --deselect=cherrypy/test/test_tools.py::ToolTests::testCombinedTools \
62− ${lib.optionalString stdenv.isDarwin
63− "--deselect=cherrypy/test/test_bus.py::BusMethodTests::test_block --deselect=cherrypy/test/test_config_server.py"}
61+ preCheck = ''
62+ # Disable doctest plugin because times out
63+ substituteInPlace pytest.ini \
64+ --replace "--doctest-modules" "-vvv"
65+ sed -i "/--cov/d" pytest.ini
6466 '';
6567
68+ pytestFlagsArray = [
69+ "-W"
70+ "ignore::DeprecationWarning"
71+ ];
72+
73+ disabledTests = [
74+ # Keyboard interrupt ends test suite run
75+ "KeyboardInterrupt"
76+ # daemonize and autoreload tests have issue with sockets within sandbox
77+ "daemonize"
78+ "Autoreload"
79+ ] ++ lib.optionals stdenv.isDarwin [
80+ "test_block"
81+ ];
82+
83+ disabledTestPaths = lib.optionals stdenv.isDarwin [
84+ "cherrypy/test/test_config_server.py"
85+ ];
86+
6687 __darwinAllowLocalNetworking = true;
6788
89+ pythonImportsCheck = [
90+ "cherrypy"
91+ ];
92+
6893 meta = with lib; {
94+ description = "Object-oriented HTTP framework";
6995 homepage = "https://www.cherrypy.org";
70− description = "A pythonic, object-oriented HTTP framework";
7196 license = licenses.bsd3;
97+ maintainers = with maintainers; [ ];
7298 };
7399}