2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchpatch
|
2021-07-14 22:03:04 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, flake8
|
2020-06-15 15:56:04 +00:00
|
|
|
, flake8-polyfill
|
2021-07-14 22:03:04 +00:00
|
|
|
, python
|
2020-06-15 15:56:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pep8-naming";
|
2021-10-04 12:37:57 +00:00
|
|
|
version = "0.12.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-04 12:37:57 +00:00
|
|
|
sha256 = "sha256-uyRVlHdX0WKqTK1V26TOApAFzRaS8omaIdUdhjDKeEE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-07-14 22:03:04 +00:00
|
|
|
flake8
|
2020-04-24 23:36:52 +00:00
|
|
|
flake8-polyfill
|
2021-07-14 22:03:04 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
patches = [
|
|
|
|
# Add missing option to get passing tests, https://github.com/PyCQA/pep8-naming/pull/181
|
|
|
|
(fetchpatch {
|
|
|
|
name = "add-missing-option.patch";
|
|
|
|
url = "https://github.com/PyCQA/pep8-naming/commit/03b8f36f6a8bb8bc79dfa5a71ad9be2a0bf8bbf5.patch";
|
|
|
|
sha256 = "1YTh84Yoj0MqFZoifM362563r1GuzaF+mMmdT/ckC7I=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} run_tests.py
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pep8ext_naming"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/PyCQA/pep8-naming";
|
|
|
|
description = "Check PEP-8 naming conventions, plugin for flake8";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
|
|
|
}
|