1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, flake8
5, python
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "pep8-naming";
11 version = "0.13.3";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "PyCQA";
18 repo = pname;
19 rev = version;
20 hash = "sha256-l7zZUOMWyTxnTbkFkzfABY/eVMKnv0kNJ0UPzJo0W1Y=";
21 };
22
23 propagatedBuildInputs = [
24 flake8
25 ];
26
27 checkPhase = ''
28 runHook preCheck
29 ${python.interpreter} run_tests.py
30 runHook postCheck
31 '';
32
33 pythonImportsCheck = [
34 "pep8ext_naming"
35 ];
36
37 meta = with lib; {
38 description = "Check PEP-8 naming conventions, plugin for flake8";
39 homepage = "https://github.com/PyCQA/pep8-naming";
40 changelog = "https://github.com/PyCQA/pep8-naming/blob/${version}/CHANGELOG.rst";
41 license = licenses.mit;
42 maintainers = with maintainers; [ eadwu ];
43 };
44}