about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/webtest/default.nix
blob: 52d48505df4734a0a0ba1e25b56425498252d591 (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
58
59
60
61
62
63
64
{ lib
, beautifulsoup4
, buildPythonPackage
, fetchPypi
, fetchpatch
, pastedeploy
, pyquery
, pytestCheckHook
, pythonOlder
, six
, waitress
, webob
, wsgiproxy2
}:

buildPythonPackage rec {
  pname = "webtest";
  version = "3.0.0";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    pname = "WebTest";
    inherit version;
    hash = "sha256-VL2WlyWDjZhhqfon+Nlx950nXZSuJV9cUB9Tu22ZKes=";
  };

  patches = [
    (fetchpatch {
      # Replace deprecated unittest aliases for Python 3.12
      name = "webtest-python312-compat.patch";
      url = "https://github.com/Pylons/webtest/commit/d82ec5bd2cf3c7109a1d49ad9fa802ae1eae1763.patch";
      hash = "sha256-hSwxAxAI3Eo28I8S+r2k/hFG8TlzrVYup3MuTsE+xXk=";
    })
  ];

  propagatedBuildInputs = [
    beautifulsoup4
    six
    waitress
    webob
  ];

  nativeCheckInputs = [
    pastedeploy
    pyquery
    pytestCheckHook
    wsgiproxy2
  ];

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [
    "webtest"
  ];

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