about summary refs log tree commit diff
path: root/pkgs/development/python-modules/testtools/default.nix
blob: ffc007af7acf6ace07ab139fb5a65db551fb9f11 (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
{ lib
, buildPythonPackage
, fetchPypi
, pythonAtLeast
, pythonRelaxDepsHook

# build-system
, hatchling
, hatch-vcs

# dependencies
, setuptools
}:

buildPythonPackage rec {
  pname = "testtools";
  version = "2.7.1";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-323pYBDinuIfY3oUfqvzDVCyXjhB3R1o+T7onOd+Nmw=";
  };

  nativeBuildInputs = [
    hatchling
    hatch-vcs
    pythonRelaxDepsHook
  ];

  pythonRemoveDeps = [
    "fixtures"
  ];

  propagatedBuildInputs = lib.optionals (pythonAtLeast "3.12") [
    setuptools
  ];

  # testscenarios has a circular dependency on testtools
  doCheck = false;

  meta = {
    description = "A set of extensions to the Python standard library's unit testing framework";
    homepage = "https://pypi.python.org/pypi/testtools";
    license = lib.licenses.mit;
  };
}