1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 flake8,
7 python,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "pep8-naming";
13 version = "0.15.1";
14 pyproject = true;
15
16 disabled = pythonOlder "3.9";
17
18 src = fetchFromGitHub {
19 owner = "PyCQA";
20 repo = "pep8-naming";
21 tag = version;
22 hash = "sha256-swSaMOrgd6R4i92LodJVsquls9wp5ZFyzK0LNqwODoc=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [ flake8 ];
28
29 checkPhase = ''
30 runHook preCheck
31 ${python.interpreter} run_tests.py
32 runHook postCheck
33 '';
34
35 pythonImportsCheck = [ "pep8ext_naming" ];
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/${src.tag}/CHANGELOG.rst";
41 license = licenses.mit;
42 maintainers = with maintainers; [ eadwu ];
43 };
44}