2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
2022-08-21 13:32:41 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, mccabe
|
|
|
|
, pycodestyle
|
|
|
|
, pyflakes
|
|
|
|
, importlib-metadata
|
2022-08-21 13:32:41 +00:00
|
|
|
, pythonAtLeast
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flake8";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "6.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyCQA";
|
|
|
|
repo = "flake8";
|
|
|
|
rev = version;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-dN9LlLpQ/ZoVIFrAQ1NxMvsHqWsgdJVLUIAFwkheEL4=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
mccabe
|
2022-08-21 13:32:41 +00:00
|
|
|
pycodestyle
|
|
|
|
pyflakes
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
# Tests fail on Python 3.7 due to importlib using a deprecated interface
|
2022-08-21 13:32:41 +00:00
|
|
|
doCheck = pythonAtLeast "3.7";
|
2021-10-17 02:12:59 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Flake8 is a wrapper around pyflakes, pycodestyle and mccabe.";
|
|
|
|
homepage = "https://github.com/pycqa/flake8";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-08-21 13:32:41 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|