1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 16:11:58 +00:00

python38Packages.flask_testing: fix build on darwin

This commit is contained in:
Mario Rodas 2020-07-28 04:20:00 -05:00
parent 56c86e7ce7
commit 2e332100df
No known key found for this signature in database
GPG key ID: 325649BCA6D53027

View file

@ -1,7 +1,4 @@
{ stdenv, fetchPypi, buildPythonPackage, pythonOlder
, flask, blinker, twill }:
with stdenv.lib;
{ stdenv, fetchPypi, buildPythonPackage, isPy3k, flask, blinker, twill }:
buildPythonPackage rec {
pname = "Flask-Testing";
@ -13,13 +10,20 @@ buildPythonPackage rec {
};
postPatch = ''
sed -i -e 's/twill==0.9.1/twill/' setup.py
substituteInPlace setup.py --replace "twill==0.9.1" "twill"
'';
buildInputs = optionals (pythonOlder "3.0") [ twill ];
propagatedBuildInputs = [ flask blinker ];
propagatedBuildInputs = [ flask ];
meta = {
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" ];
meta = with stdenv.lib; {
description = "Flask unittest integration.";
homepage = "https://pythonhosted.org/Flask-Testing/";
license = licenses.bsd3;