about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyflakes/default.nix
blob: d83c02783729cb3f3ab2b5d2ad2825c8aa98d36d (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
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, fetchpatch, isPy311
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pyflakes";
  version = "3.0.1";

  disabled = pythonOlder "3.6";

  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-7IsnamtgvYDe/tJa3X5DmIHBnmSFCv2bNGKD1BZf0P0=";
  };

  patches = lib.optional isPy311 # could be made unconditional on rebuild
    (fetchpatch {
      name = "tests-py311.patch";
      url = "https://github.com/PyCQA/pyflakes/commit/836631f2f73d45baa4021453d89fc9fd6f52be58.diff";
      hash = "sha256-xlgql+bN0HsGnTMkwax3ZG/5wrbkUl/kQkjlr3lsgRw=";
    })
  ;

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [ "pyflakes" ];

  meta = with lib; {
    homepage = "https://github.com/PyCQA/pyflakes";
    changelog = "https://github.com/PyCQA/pyflakes/blob/${version}/NEWS.rst";
    description = "A simple program which checks Python source files for errors";
    license = licenses.mit;
    maintainers = with maintainers; [ dotlambda ];
  };
}