2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
, cheroot, portend, more-itertools, zc_lockfile, routes
|
2020-08-20 17:08:02 +00:00
|
|
|
, jaraco_collections
|
2021-07-24 12:14:16 +00:00
|
|
|
, objgraph, pytest, pytest-cov, pathpy, requests-toolbelt, pytest-services
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchpatch
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cherrypy";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "18.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "CherryPy";
|
|
|
|
inherit version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "16f410izp2c4qhn4n3l5l3qirmkf43h2amjqms8hkl0shgfqwq2n";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
# 1/3 Fix compatibility with pytest 6. Will be part of the next release after 18.6
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/cherrypy/cherrypy/pull/1897/commits/59c0e19d7df8680e36afc96756dce72435121448.patch";
|
|
|
|
sha256 = "1jachbvp505gndccdhny0c3grzdrmvmbzq4kw55jx93ay94ni6p0";
|
|
|
|
})
|
|
|
|
# 2/3 Fix compatibility with pytest 6. Will be part of the next release after 18.6
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/cherrypy/cherrypy/pull/1897/commits/4a6287b73539adcb7b0ae72d69644a1ced1f7eaa.patch";
|
|
|
|
sha256 = "0nz40qmgxknkbjsdzfzcqfxdsmsxx3v104fb0h04yvs76mqvw3i4";
|
|
|
|
})
|
|
|
|
# 3/3 Fix compatibility with pytest 6. Will be part of the next release after 18.6
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/cherrypy/cherrypy/commit/3bae7f06868553b006915f05ff14d86163f59a7d.patch";
|
|
|
|
sha256 = "1z0bv23ybyw87rf1i8alsdi3gc2bzmdj9d0kjsghdkvi3zdp4n8q";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
# required
|
|
|
|
cheroot portend more-itertools zc_lockfile
|
2020-08-20 17:08:02 +00:00
|
|
|
jaraco_collections
|
2020-04-24 23:36:52 +00:00
|
|
|
# optional
|
|
|
|
routes
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-07-24 12:14:16 +00:00
|
|
|
objgraph pytest pytest-cov pathpy requests-toolbelt pytest-services
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# Keyboard interrupt ends test suite run
|
|
|
|
# daemonize and autoreload tests have issue with sockets within sandbox
|
2020-04-24 23:36:52 +00:00
|
|
|
# Disable doctest plugin because times out
|
|
|
|
checkPhase = ''
|
|
|
|
substituteInPlace pytest.ini --replace "--doctest-modules" ""
|
|
|
|
pytest \
|
2021-03-19 17:17:44 +00:00
|
|
|
-W ignore \
|
2020-09-25 04:45:31 +00:00
|
|
|
-k 'not KeyboardInterrupt and not daemonize and not Autoreload' \
|
2020-04-24 23:36:52 +00:00
|
|
|
--deselect=cherrypy/test/test_static.py::StaticTest::test_null_bytes \
|
|
|
|
--deselect=cherrypy/test/test_tools.py::ToolTests::testCombinedTools \
|
2021-02-05 17:12:51 +00:00
|
|
|
${lib.optionalString stdenv.isDarwin
|
2021-07-18 21:22:44 +00:00
|
|
|
"--deselect=cherrypy/test/test_bus.py::BusMethodTests::test_block --deselect=cherrypy/test/test_config_server.py"}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.cherrypy.org";
|
|
|
|
description = "A pythonic, object-oriented HTTP framework";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|