1{ lib, stdenv, fetchPypi, buildPythonPackage, isPy3k, flask, blinker, twill }: 2 3buildPythonPackage rec { 4 pname = "Flask-Testing"; 5 version = "0.8.1"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "0a734d7b68e63a9410b413cd7b1f96456f9a858bd09a6222d465650cc782eb01"; 10 }; 11 12 postPatch = '' 13 substituteInPlace setup.py --replace "twill==0.9.1" "twill" 14 ''; 15 16 propagatedBuildInputs = [ flask ]; 17 18 checkInputs = [ blinker ] ++ lib.optionals (!isPy3k) [ twill ]; 19 20 # twill integration is outdated in Python 2, hence it the tests fails. 21 # Some of the tests use localhost networking on darwin. 22 doCheck = isPy3k && !stdenv.isDarwin; 23 24 pythonImportsCheck = [ "flask_testing" ]; 25 26 meta = with lib; { 27 description = "Flask unittest integration."; 28 homepage = "https://pythonhosted.org/Flask-Testing/"; 29 license = licenses.bsd3; 30 maintainers = [ maintainers.mic92 ]; 31 }; 32}