2020-08-20 17:08:02 +00:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage, isPy3k, flask, blinker, twill }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Flask-Testing";
|
2020-12-27 14:24:52 +00:00
|
|
|
version = "0.8.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-27 14:24:52 +00:00
|
|
|
sha256 = "0a734d7b68e63a9410b413cd7b1f96456f9a858bd09a6222d465650cc782eb01";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-08-20 17:08:02 +00:00
|
|
|
substituteInPlace setup.py --replace "twill==0.9.1" "twill"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00: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" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Flask unittest integration.";
|
|
|
|
homepage = "https://pythonhosted.org/Flask-Testing/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
};
|
|
|
|
}
|