about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/sure/default.nix
blob: aaa7cba6494e57379f1c5769dcb1f72ffde05256 (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
{ lib
, buildPythonPackage
, fetchPypi
, nose
, mock
, six
, isPyPy
, pythonOlder
}:

buildPythonPackage rec {
  pname = "sure";
  version = "2.0.1";
  format = "setuptools";

  disabled = isPyPy;

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-yPxvq8Dn9phO6ruUJUDkVkblvvC7mf5Z4C2mNOTUuco=";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace "rednose = 1" ""
  '';

  propagatedBuildInputs = [
    mock
    six
  ];

  doCheck = pythonOlder "3.12"; # nose requires imp module

  nativeCheckInputs = [
    nose
  ];

  pythonImportsCheck = [
    "sure"
  ];

  meta = with lib; {
    description = "Utility belt for automated testing";
    homepage = "https://sure.readthedocs.io/";
    changelog = "https://github.com/gabrielfalcao/sure/blob/v${version}/CHANGELOG.md";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ ];
  };
}