aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/flask-testing/default.nix
blob: feb3766067bf9c7dc0432a9291bd47cd2a93a25e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchPypi, buildPythonPackage, isPy3k, flask, blinker, twill }:

buildPythonPackage rec {
  pname = "Flask-Testing";
  version = "0.8.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1rkkqgmrzmhpv6y1xysqh0ij03xniic8h631yvghksqwxd9vyjfq";
  };

  postPatch = ''
    substituteInPlace setup.py --replace "twill==0.9.1" "twill"
  '';

  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 = with stdenv.lib; {
    description = "Flask unittest integration.";
    homepage = "https://pythonhosted.org/Flask-Testing/";
    license = licenses.bsd3;
    maintainers = [ maintainers.mic92 ];
  };
}