2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
|
|
|
|
, mock, pytest, pytestrunner
|
2020-07-18 16:06:22 +00:00
|
|
|
, configparser, enum34, mccabe, pycodestyle, pyflakes, functools32, typing, importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flake8";
|
2020-11-19 00:13:47 +00:00
|
|
|
version = "3.8.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-19 00:13:47 +00:00
|
|
|
sha256 = "aadae8761ec651813c24be05c6f7b4680857ef6afaae4651a4eccaef97ce6c3b";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest mock pytestrunner ];
|
2020-07-18 16:06:22 +00:00
|
|
|
propagatedBuildInputs = [ pyflakes pycodestyle mccabe ]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ stdenv.lib.optionals (pythonOlder "3.2") [ configparser functools32 ]
|
|
|
|
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ]
|
2020-07-18 16:06:22 +00:00
|
|
|
++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ]
|
|
|
|
++ stdenv.lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# fixtures fail to initialize correctly
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
py.test tests --ignore=tests/integration/test_checker.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Code checking using pep8 and pyflakes";
|
|
|
|
homepage = "https://pypi.python.org/pypi/flake8";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|