depot/third_party/nixpkgs/pkgs/development/python-modules/pep8-naming/default.nix
Default email 3b21d1e521 Project import generated by Copybara.
GitOrigin-RevId: 23cd13167a1432550e48734079c2ffeeb441fb96
2021-07-15 00:03:04 +02:00

48 lines
1 KiB
Nix

{ lib
, fetchPypi
, fetchpatch
, buildPythonPackage
, flake8
, flake8-polyfill
, python
}:
buildPythonPackage rec {
pname = "pep8-naming";
version = "0.11.1";
src = fetchPypi {
inherit pname version;
sha256 = "0937rnk3c2z1jkdmbw9hfm80p5k467q7rqhn6slfiprs4kflgpd1";
};
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";
})
];
propagatedBuildInputs = [
flake8
flake8-polyfill
];
checkPhase = ''
runHook preCheck
${python.interpreter} run_tests.py
runHook postCheck
'';
pythonImportsCheck = [
"pep8ext_naming"
];
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 ];
};
}