2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, fetchpatch
|
|
|
|
, 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";
|
2020-07-18 16:06:22 +00:00
|
|
|
version = "0.11.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-18 16:06:22 +00:00
|
|
|
sha256 = "0937rnk3c2z1jkdmbw9hfm80p5k467q7rqhn6slfiprs4kflgpd1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# Fix tests by setting extended-default-ignore to an empty list
|
|
|
|
url = "https://github.com/PyCQA/pep8-naming/commit/6d62db81d7967e123e29673a4796fefec6f06d26.patch";
|
|
|
|
sha256 = "1jpr2dga8sphksik3izyzq9hiszyki691mwnh2rjzd2vpgnv8cxf";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|