2020-07-28 10:20:00 +01:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage, isPy3k, flask, blinker, twill }:
|
2017-01-13 23:13:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-08-28 22:20:01 +01:00
|
|
|
pname = "Flask-Testing";
|
2020-03-15 19:29:29 +00:00
|
|
|
version = "0.8.0";
|
2017-01-13 23:13:45 +00:00
|
|
|
|
2017-08-28 22:20:01 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-03-15 19:29:29 +00:00
|
|
|
sha256 = "1rkkqgmrzmhpv6y1xysqh0ij03xniic8h631yvghksqwxd9vyjfq";
|
2017-01-13 23:13:45 +00:00
|
|
|
};
|
|
|
|
|
2017-08-28 22:20:01 +01:00
|
|
|
postPatch = ''
|
2020-07-28 10:20:00 +01:00
|
|
|
substituteInPlace setup.py --replace "twill==0.9.1" "twill"
|
2017-08-28 22:20:01 +01:00
|
|
|
'';
|
|
|
|
|
2020-07-28 10:20:00 +01:00
|
|
|
propagatedBuildInputs = [ flask ];
|
|
|
|
|
|
|
|
checkInputs = [ blinker ] ++ stdenv.lib.optionals (!isPy3k) [ twill ];
|
|
|
|
|
|
|
|
# twill integration is outdated in Python 2, hence it the tests fails.
|
|
|
|
# Some of the tests use localhost networking on darwin.
|
|
|
|
doCheck = isPy3k && !stdenv.isDarwin;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "flask_testing" ];
|
2017-01-13 23:13:45 +00:00
|
|
|
|
2020-07-28 10:20:00 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-01-13 23:13:45 +00:00
|
|
|
description = "Flask unittest integration.";
|
2020-03-15 19:29:29 +00:00
|
|
|
homepage = "https://pythonhosted.org/Flask-Testing/";
|
2017-01-13 23:13:45 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
};
|
|
|
|
}
|