1{
2 lib,
3 buildPythonPackage,
4 django,
5 django-tables2,
6 django-tastypie,
7 factory-boy,
8 fetchFromGitHub,
9 poetry-core,
10 pylint-plugin-utils,
11 pytestCheckHook,
12 pythonOlder,
13}:
14
15buildPythonPackage rec {
16 pname = "pylint-django";
17 version = "2.6.1";
18 pyproject = true;
19
20 disabled = pythonOlder "3.9";
21
22 src = fetchFromGitHub {
23 owner = "PyCQA";
24 repo = "pylint-django";
25 tag = "v${version}";
26 hash = "sha256-9b0Sbo6E036UmUmP/CVPrS9cxxKtkMMZtqJsI53g4sU=";
27 };
28
29 build-system = [ poetry-core ];
30
31 dependencies = [ pylint-plugin-utils ];
32
33 optional-dependencies = {
34 with_django = [ django ];
35 };
36
37 nativeCheckInputs = [
38 django-tables2
39 django-tastypie
40 factory-boy
41 pytestCheckHook
42 ];
43
44 disabledTests = [
45 # AttributeError: module 'pylint.interfaces' has no attribute 'IAstroidChecker'
46 "test_migrations_plugin"
47 "func_noerror_model_unicode_lambda"
48 "test_linter_should_be_pickleable_with_pylint_django_plugin_installed"
49 "func_noerror_model_fields"
50 "func_noerror_form_fields"
51 ];
52
53 pythonImportsCheck = [ "pylint_django" ];
54
55 meta = with lib; {
56 description = "Pylint plugin to analyze Django applications";
57 homepage = "https://github.com/PyCQA/pylint-django";
58 changelog = "https://github.com/pylint-dev/pylint-django/releases/tag/v${version}";
59 license = licenses.gpl2Plus;
60 maintainers = with maintainers; [ kamadorueda ];
61 };
62}