2020-04-24 23:36:52 +00:00
|
|
|
{ buildPythonPackage
|
2022-08-21 13:32:41 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, lib
|
2020-06-15 15:56:04 +00:00
|
|
|
, python
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycodestyle";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "2.9.1";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
# https://github.com/PyCQA/pycodestyle/blob/2.9.1/tox.ini#L13
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2022-08-21 13:32:41 +00:00
|
|
|
${python.interpreter} -m pycodestyle --statistics pycodestyle.py
|
|
|
|
${python.interpreter} -m pycodestyle --max-doc-length=72 --testsuite testsuite
|
|
|
|
${python.interpreter} -m pycodestyle --max-doc-length=72 --doctest
|
2020-06-15 15:56:04 +00:00
|
|
|
${python.interpreter} -m unittest discover testsuite -vv
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
pythonImportsCheck = [ "pycodestyle" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-08-21 13:32:41 +00:00
|
|
|
description = "Python style guide checker";
|
|
|
|
homepage = "https://pycodestyle.pycqa.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [
|
|
|
|
kamadorueda
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|