2022-08-21 13:32:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchpatch, isPy311
|
2022-08-21 13:32:41 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyflakes";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "3.0.1";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-7IsnamtgvYDe/tJa3X5DmIHBnmSFCv2bNGKD1BZf0P0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
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=";
|
|
|
|
})
|
|
|
|
;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-21 13:32:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
pythonImportsCheck = [ "pyflakes" ];
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-08-21 13:32:41 +00:00
|
|
|
homepage = "https://github.com/PyCQA/pyflakes";
|
|
|
|
changelog = "https://github.com/PyCQA/pyflakes/blob/${version}/NEWS.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A simple program which checks Python source files for errors";
|
|
|
|
license = licenses.mit;
|
2022-08-21 13:32:41 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|