2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
|
|
|
, nose
|
|
|
|
, webob
|
|
|
|
, six
|
|
|
|
, beautifulsoup4
|
|
|
|
, waitress
|
|
|
|
, mock
|
|
|
|
, pyquery
|
|
|
|
, wsgiproxy2
|
2021-10-08 15:17:17 +00:00
|
|
|
, pastedeploy
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-08-22 07:53:02 +00:00
|
|
|
version = "2.0.35";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "webtest";
|
|
|
|
disabled = isPy27; # paste.deploy is not longer a valid import
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "WebTest";
|
|
|
|
inherit version;
|
2021-08-22 07:53:02 +00:00
|
|
|
sha256 = "sha256-qsFotbK08gCvTjWGfPMWcSIQ49XbgcHL3/OHImR7sIc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace setup.py --replace "nose<1.3.0" "nose"
|
|
|
|
'';
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
webob
|
|
|
|
six
|
|
|
|
beautifulsoup4
|
|
|
|
waitress
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
nose
|
|
|
|
mock
|
2021-10-08 15:17:17 +00:00
|
|
|
pastedeploy
|
2021-08-22 07:53:02 +00:00
|
|
|
wsgiproxy2
|
|
|
|
pyquery
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Some of the tests use localhost networking.
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
pythonImportsCheck = [ "webtest" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Helper to test WSGI applications";
|
|
|
|
homepage = "https://webtest.readthedocs.org/en/latest/";
|
|
|
|
license = licenses.mit;
|
2021-08-22 07:53:02 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|