about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pycodestyle/default.nix
blob: f17001efdda16bae2081aed59f95b0baf3e22908 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ buildPythonPackage
, pythonOlder
, fetchPypi
, lib
, python
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pycodestyle";
  version = "2.11.1";

  disabled = pythonOlder "3.6";

  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-QboOevyXUt+1PO1UieifgYa+AOWZ5xJmBpW3p1/yZj8=";
  };

  pythonImportsCheck = [
    "pycodestyle"
  ];

  nativCheckInputs = [
    pytestCheckHook
  ];

  # https://github.com/PyCQA/pycodestyle/blob/2.11.0/tox.ini#L16
  postCheck = ''
    ${python.interpreter} -m pycodestyle --statistics pycodestyle.py
  '';

  meta = with lib; {
    changelog = "https://github.com/PyCQA/pycodestyle/blob/${version}/CHANGES.txt";
    description = "Python style guide checker";
    mainProgram = "pycodestyle";
    homepage = "https://pycodestyle.pycqa.org/";
    license = licenses.mit;
    maintainers = with maintainers; [
      kamadorueda
    ];
  };
}