Skip to content

Commit

Permalink
python38Packages.flask_testing: fix build on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
marsam committed Jul 28, 2020
1 parent 56c86e7 commit 2e33210
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions pkgs/development/python-modules/flask-testing/default.nix
@@ -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";
Expand All @@ -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 ];

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 = {
meta = with stdenv.lib; {
description = "Flask unittest integration.";
homepage = "https://pythonhosted.org/Flask-Testing/";
license = licenses.bsd3;
Expand Down

0 comments on commit 2e33210

Please sign in to comment.