1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, fetchpatch, isPy311
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "pyflakes";
11 version = "3.0.1";
12
13 disabled = pythonOlder "3.6";
14
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-7IsnamtgvYDe/tJa3X5DmIHBnmSFCv2bNGKD1BZf0P0=";
20 };
21
22 patches = lib.optional isPy311 # could be made unconditional on rebuild
23 (fetchpatch {
24 name = "tests-py311.patch";
25 url = "https://github.com/PyCQA/pyflakes/commit/836631f2f73d45baa4021453d89fc9fd6f52be58.diff";
26 hash = "sha256-xlgql+bN0HsGnTMkwax3ZG/5wrbkUl/kQkjlr3lsgRw=";
27 })
28 ;
29
30 nativeCheckInputs = [
31 pytestCheckHook
32 ];
33
34 pythonImportsCheck = [ "pyflakes" ];
35
36 meta = with lib; {
37 homepage = "https://github.com/PyCQA/pyflakes";
38 changelog = "https://github.com/PyCQA/pyflakes/blob/${version}/NEWS.rst";
39 description = "A simple program which checks Python source files for errors";
40 license = licenses.mit;
41 maintainers = with maintainers; [ dotlambda ];
42 };
43}