about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/webtest/default.nix
blob: 999d2560591d57372380898280c769e2d289fadd (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, nose
, webob
, six
, beautifulsoup4
, waitress
, mock
, pyquery
, wsgiproxy2
, pastedeploy
}:

buildPythonPackage rec {
  version = "2.0.35";
  pname = "webtest";
  disabled = isPy27; # paste.deploy is not longer a valid import

  src = fetchPypi {
    pname = "WebTest";
    inherit version;
    sha256 = "sha256-qsFotbK08gCvTjWGfPMWcSIQ49XbgcHL3/OHImR7sIc=";
  };

  postPatch = ''
    substituteInPlace setup.py --replace "nose<1.3.0" "nose"
  '';

  propagatedBuildInputs = [
    webob
    six
    beautifulsoup4
    waitress
  ];

  checkInputs = [
    nose
    mock
    pastedeploy
    wsgiproxy2
    pyquery
  ];

  # Some of the tests use localhost networking.
  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [ "webtest" ];

  meta = with lib; {
    description = "Helper to test WSGI applications";
    homepage = "https://webtest.readthedocs.org/en/latest/";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}