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-12-17 10:02:37 +00:00
|
|
|
version = "2.10.0";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-NHGHvbR2Mp2Y9pXCE9cpWoRtEVL/T+m6y4qVkLjucFM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/PyCQA/pycodestyle/issues/1151
|
|
|
|
# Applies a modified version of an upstream patch that only applied
|
|
|
|
# to Python 3.12.
|
|
|
|
./python-3.11.4-compat.patch
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
# https://github.com/PyCQA/pycodestyle/blob/2.10.0/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-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/PyCQA/pycodestyle/blob/${version}/CHANGES.txt";
|
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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|