2021-01-11 07:54:33 +00:00
|
|
|
{ lib, 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-12-26 22:13:06 +00:00
|
|
|
version = "0.8.1";
|
2017-01-13 23:13:45 +00:00
|
|
|
|
2017-08-28 22:20:01 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-26 22:13:06 +00:00
|
|
|
sha256 = "0a734d7b68e63a9410b413cd7b1f96456f9a858bd09a6222d465650cc782eb01";
|
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 ];
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
checkInputs = [ blinker ] ++ lib.optionals (!isPy3k) [ twill ];
|
2020-07-28 10:20:00 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with 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 ];
|
|
|
|
};
|
|
|
|
}
|