1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 python,
6 pytestCheckHook,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "pycodestyle";
12 version = "2.13.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "PyCQA";
17 repo = "pycodestyle";
18 rev = version;
19 hash = "sha256-jpF0/sVzRjot8KRdXqvhWpdafzC/Fska6jmG3s2U6Wk=";
20 };
21
22 build-system = [ setuptools ];
23
24 pythonImportsCheck = [ "pycodestyle" ];
25
26 nativeCheckInputs = [ pytestCheckHook ];
27
28 # https://github.com/PyCQA/pycodestyle/blob/2.13.0/tox.ini#L16
29 postCheck = ''
30 ${python.interpreter} -m pycodestyle --statistics pycodestyle.py
31 '';
32
33 meta = with lib; {
34 changelog = "https://github.com/PyCQA/pycodestyle/blob/${version}/CHANGES.txt";
35 description = "Python style guide checker";
36 mainProgram = "pycodestyle";
37 homepage = "https://pycodestyle.pycqa.org/";
38 license = licenses.mit;
39 maintainers = with maintainers; [ kamadorueda ];
40 };
41}