python310Packages.flake8: 4.0.1 -> 5.0.4

This commit is contained in:
Robert Schütz 2022-08-11 12:30:45 +00:00 committed by Robert Schütz
parent a6b0f5faaa
commit b52e388cb3

View file

@ -1,62 +1,49 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, configparser
, enum34
, fetchFromGitHub
, mccabe
, pycodestyle
, pyflakes
, functools32
, typing
, importlib-metadata
, mock
, pythonAtLeast
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "flake8";
version = "4.0.1";
version = "5.0.4";
src = fetchPypi {
inherit pname version;
sha256 = "03c7mnk34wfz7a0m5zq0273y94awz69fy5iww8alh4a4v96h6vl0";
disabled = pythonOlder "3.6";
format = "setuptools";
src = fetchFromGitHub {
owner = "PyCQA";
repo = "flake8";
rev = version;
hash = "sha256-Os8HIoM07/iOBMm+0WxdQj32pJJOJ8mkh+yLHpqkLXg=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "mccabe>=0.6.0,<0.7.0" "mccabe>=0.7.0,<0.8.0"
'';
propagatedBuildInputs = [
pyflakes
pycodestyle
mccabe
] ++ lib.optionals (pythonOlder "3.2") [
configparser
functools32
] ++ lib.optionals (pythonOlder "3.4") [
enum34
] ++ lib.optionals (pythonOlder "3.5") [
typing
pycodestyle
pyflakes
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
# Tests fail on Python 3.7 due to importlib using a deprecated interface
doCheck = !(pythonOlder "3.8");
doCheck = pythonAtLeast "3.7";
checkInputs = [
mock
pytestCheckHook
];
disabled = pythonOlder "3.6";
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; [ ];
maintainers = with maintainers; [ dotlambda ];
};
}