blob: 860f449fd8b3f393bbd705fd61d529a8a8c7f4eb (
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
, pythonOlder
, fetchFromGitHub
, mccabe
, pycodestyle
, pyflakes
, importlib-metadata
, pythonAtLeast
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "flake8";
version = "6.0.0";
disabled = pythonOlder "3.8";
format = "setuptools";
src = fetchFromGitHub {
owner = "PyCQA";
repo = "flake8";
rev = version;
hash = "sha256-dN9LlLpQ/ZoVIFrAQ1NxMvsHqWsgdJVLUIAFwkheEL4=";
};
propagatedBuildInputs = [
mccabe
pycodestyle
pyflakes
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
# Tests fail on Python 3.7 due to importlib using a deprecated interface
doCheck = pythonAtLeast "3.7";
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Flake8 is a wrapper around pyflakes, pycodestyle and mccabe.";
homepage = "https://github.com/pycqa/flake8";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
mainProgram = "flake8";
};
}
|