|
1 | | -Vendor: Microsoft Corporation |
2 | | -Distribution: Azure Linux |
| 1 | +# Remove -s from Python shebang - ensure that extensions installed with pip |
| 2 | +# to user locations are seen and properly loaded |
| 3 | +%undefine _py3_shebang_s |
| 4 | + |
| 5 | +%global forgeurl https://github.com/PyCQA/pylint |
| 6 | +%global basever 4.0.2 |
| 7 | +#%%global prever b0 |
| 8 | +Version: 4.0.2 |
| 9 | + |
3 | 10 | Name: pylint |
4 | | -Version: 2.4.4 |
5 | | -Release: 4%{?dist} |
| 11 | +Release: 2%{?dist} |
6 | 12 | Summary: Analyzes Python code looking for bugs and signs of poor quality |
7 | | -License: GPLv2+ |
8 | | -URL: http://www.pylint.org/ |
9 | | -Source0: %{pypi_source} |
10 | | - |
| 13 | +License: GPL-2.0-or-later |
| 14 | +Vendor: Microsoft Corporation |
| 15 | +Distribution: Azure Linux |
| 16 | +URL: https://github.com/pylint-dev/pylint |
| 17 | +Source0: %{forgeurl}/archive/v%{basever}/pylint-%{basever}.tar.gz |
| 18 | +#Patch0: 7829.patch apply when rebased then re-enable tests |
| 19 | +Patch1: pep639.patch |
11 | 20 | BuildArch: noarch |
12 | 21 |
|
| 22 | +BuildRequires: pyproject-rpm-macros |
13 | 23 | BuildRequires: python3-devel |
| 24 | +BuildRequires: python3-pip |
| 25 | +BuildRequires: python3-wheel |
14 | 26 | BuildRequires: python3-setuptools |
15 | 27 | # For tests |
16 | | -BuildRequires: python3-astroid >= 2.0.2 |
| 28 | +BuildRequires: python3-pytest-benchmark |
| 29 | +BuildRequires: python3-pytest-xdist |
| 30 | +BuildRequires: python3-typing-extensions |
| 31 | +BuildRequires: graphviz |
| 32 | +BuildRequires: python3-execnet |
| 33 | +BuildRequires: python3-astroid |
| 34 | +BuildRequires: python3-platformdirs |
17 | 35 | BuildRequires: python3-isort |
| 36 | +BuildRequires: git |
18 | 37 | BuildRequires: python3-mccabe |
19 | | -BuildRequires: python3-pytest |
20 | | -BuildRequires: python3-pytest-runner |
21 | 38 |
|
22 | 39 | # For the main pylint package |
23 | 40 | Requires: python3-%{name} = %{version}-%{release} |
24 | 41 |
|
25 | | -%description |
26 | | -Pylint is a Python source code analyzer which looks for programming |
27 | | -errors, helps enforcing a coding standard and sniffs for some code |
28 | | -smells (as defined in Martin Fowler's Refactoring book). |
29 | | -Pylint can be seen as another PyChecker since nearly all tests you |
30 | | -can do with PyChecker can also be done with Pylint. However, Pylint |
31 | | -offers some more features, like checking length of lines of code, |
32 | | -checking if variable names are well-formed according to your coding |
33 | | -standard, or checking if declared interfaces are truly implemented, |
34 | | -and much more. |
35 | | -Additionally, it is possible to write plugins to add your own checks. |
| 42 | +%global _description %{expand: |
| 43 | +Pylint is a Python source code analyzer which looks for programming errors, |
| 44 | +helps enforcing a coding standard and sniffs for some code smells (as defined in |
| 45 | +Martin Fowler's Refactoring book). Pylint can be seen as another PyChecker since |
| 46 | +nearly all tests you can do with PyChecker can also be done with Pylint. |
| 47 | +However, Pylint offers some more features, like checking length of lines of |
| 48 | +code, checking if variable names are well-formed according to your coding |
| 49 | +standard, or checking if declared interfaces are truly implemented, and much |
| 50 | +more. |
| 51 | + |
| 52 | +Additionally, it is possible to write plugins to add your own checks.} |
| 53 | + |
| 54 | +%description %_description |
36 | 55 |
|
37 | 56 | %package -n python3-%{name} |
38 | 57 | Summary: %{summary} |
39 | | -Requires: python3-astroid >= 2.3.0 |
40 | | -Requires: python3-setuptools |
41 | | -Requires: python3-mccabe |
42 | | -Requires: python3-isort |
43 | | -Obsoletes: python3-pylint-gui < 1.7 |
44 | | -%{?python_provide:%python_provide python3-%{name}} |
45 | | - |
46 | | -%description -n python3-%{name} |
47 | | -Pylint is a Python source code analyzer which looks for programming |
48 | | -errors, helps enforcing a coding standard and sniffs for some code |
49 | | -smells (as defined in Martin Fowler's Refactoring book). |
50 | | -Pylint can be seen as another PyChecker since nearly all tests you |
51 | | -can do with PyChecker can also be done with Pylint. However, Pylint |
52 | | -offers some more features, like checking length of lines of code, |
53 | | -checking if variable names are well-formed according to your coding |
54 | | -standard, or checking if declared interfaces are truly implemented, |
55 | | -and much more. |
56 | | -Additionally, it is possible to write plugins to add your own checks. |
| 58 | + |
| 59 | +%description -n python3-%{name} %_description |
57 | 60 |
|
58 | 61 | %prep |
59 | | -%autosetup -p1 |
| 62 | +%autosetup -p1 -n %{name}-%{basever} |
| 63 | +# Relax version requirements |
| 64 | +sed -i -e 's/"setuptools>=[^"]*"/"setuptools"/' pyproject.toml |
60 | 65 |
|
61 | | -# Convert DOS line endings to Unix |
62 | | -sed -i 's/\r//g' README.rst |
63 | 66 |
|
64 | 67 | %build |
65 | | -%py3_build |
| 68 | +%pyproject_wheel |
66 | 69 |
|
67 | 70 | %install |
68 | | -%py3_install |
| 71 | +%pyproject_install |
69 | 72 | rm -rf %{buildroot}%{python3_sitelib}/pylint/test |
70 | 73 |
|
71 | | -mkdir -pm 755 %{buildroot}%{_mandir}/man1 |
72 | | -install -pm 644 man/*.1 %{buildroot}%{_mandir}/man1/ |
73 | | - |
74 | 74 | # Add -%%{python3_version} to the binaries and manpages for backwards compatibility |
75 | | -for NAME in epylint pylint pyreverse symilar; do |
| 75 | +for NAME in pylint pyreverse symilar; do |
76 | 76 | mv %{buildroot}%{_bindir}/{$NAME,${NAME}-%{python3_version}} |
77 | 77 | ln -s ${NAME}-%{python3_version} %{buildroot}%{_bindir}/${NAME}-3 |
78 | | - mv %{buildroot}%{_mandir}/man1/{${NAME}.1,${NAME}-%{python3_version}.1} |
79 | | - ln -s ${NAME}-%{python3_version}.1 %{buildroot}%{_mandir}/man1/${NAME}-3.1 |
80 | 78 | ln -s ${NAME}-%{python3_version} %{buildroot}%{_bindir}/${NAME} |
81 | | - ln -s ${NAME}-%{python3_version}.1 %{buildroot}%{_mandir}/man1/${NAME}.1 |
82 | 79 | done |
83 | 80 |
|
84 | 81 | %check |
85 | | -export PYTHONPATH=%{buildroot}%{python3_sitelib} |
86 | | -%{__python3} bin/pylint -rn --rcfile=pylintrc --load-plugins=pylint.extensions.docparams, pylint.extensions.mccabe pylint || : |
87 | | -# Skip failing tests. |
88 | | -%{__python3} -m pytest -v -k "not (test_by_module_statement_value or import_outside_toplevel or deprecated_methods_py38 or member_checks_py37)" |
| 82 | +pip3 install tomlkit==0.12.5 \ |
| 83 | + dill \ |
| 84 | + GitPython |
| 85 | +# Skip benchmarks |
| 86 | +# Deselect all tests failing with Python 3.14 |
| 87 | +%pytest -v --ignore=benchmark \ |
| 88 | + -n auto \ |
| 89 | + --deselect=tests/test_functional.py::test_functional[missing_timeout] \ |
| 90 | + --deselect=tests/config/pylint_config/test_pylint_config_help.py::test_pylint_config_main_messages \ |
| 91 | + --deselect=tests/pyreverse/test_writer.py::test_dot_files[packages_No_Name.dot] \ |
| 92 | + --deselect=tests/pyreverse/test_writer.py::test_dot_files[classes_No_Name.dot] \ |
| 93 | + --deselect=tests/pyreverse/test_writer.py::test_colorized_dot_files[packages_colorized.dot] \ |
| 94 | + --deselect=tests/pyreverse/test_writer.py::test_colorized_dot_files[classes_colorized.dot] \ |
| 95 | + --deselect=tests/pyreverse/test_writer.py::test_no_standalone_dot_files[classes_no_standalone.dot] \ |
| 96 | + --deselect=tests/pyreverse/test_writer.py::test_no_standalone_dot_files[packages_no_standalone.dot] \ |
| 97 | + --deselect=tests/pyreverse/test_writer.py::test_type_check_imports_dot_files[packages_type_check_imports.dot] \ |
| 98 | + --deselect=tests/pyreverse/test_writer.py::test_type_check_imports_dot_files[classes_type_check_imports.dot] \ |
| 99 | + --deselect=tests/pyreverse/test_writer.py::test_puml_files[packages_No_Name.puml] \ |
| 100 | + --deselect=tests/pyreverse/test_writer.py::test_puml_files[classes_No_Name.puml] \ |
| 101 | + --deselect=tests/pyreverse/test_writer.py::test_mmd_files[packages_No_Name.mmd] \ |
| 102 | + --deselect=tests/pyreverse/test_writer.py::test_mmd_files[classes_No_Name.mmd] \ |
| 103 | + --deselect=tests/pyreverse/test_writer.py::test_html_files[packages_No_Name.html] \ |
| 104 | + --deselect=tests/pyreverse/test_writer.py::test_html_files[classes_No_Name.html] \ |
| 105 | + --deselect=tests/pyreverse/test_writer.py::test_colorized_puml_files[packages_colorized.puml] \ |
| 106 | + --deselect=tests/pyreverse/test_writer.py::test_colorized_puml_files[classes_colorized.puml] \ |
| 107 | + --deselect=tests/test_functional.py::test_functional[continue_in_finally] \ |
| 108 | + --deselect=tests/test_functional.py::test_functional[consider_using_with] \ |
| 109 | + --deselect=tests/test_functional.py::test_functional[typing_broken_callable] \ |
| 110 | + --deselect=tests/test_functional.py::test_functional[typing_broken_callable_future_import] \ |
| 111 | + --deselect=tests/test_functional.py::test_functional[typing_consider_using_union] \ |
| 112 | + --deselect=tests/test_functional.py::test_functional[typing_consider_using_union_py310] \ |
| 113 | + --deselect=tests/test_functional.py::test_functional[typing_consider_using_union_without_future] \ |
| 114 | + --deselect=tests/test_functional.py::test_functional[function_redefined_2540] \ |
| 115 | + --deselect=tests/test_functional.py::test_functional[generic_alias_collections] \ |
| 116 | + --deselect=tests/test_functional.py::test_functional[generic_alias_mixed_py39] \ |
| 117 | + --deselect=tests/test_functional.py::test_functional[generic_alias_typing] \ |
| 118 | + --deselect=tests/test_functional.py::test_functional[lost_exception] \ |
| 119 | + --deselect=tests/test_functional.py::test_functional[return_in_finally] \ |
| 120 | + --deselect=tests/test_functional.py::test_functional[wrong_import_order] \ |
| 121 | + --deselect=tests/test_import_graph.py::test_dependencies_graph[foo.dot] \ |
| 122 | + --deselect=tests/test_import_graph.py::test_dependencies_graph[foo.gv] \ |
| 123 | + --deselect=tests/test_import_graph.py::test_dependencies_graph[tests/regrtest_data/foo.dot] \ |
| 124 | + --deselect=tests/test_import_graph.py::test_checker_dep_graphs \ |
| 125 | + --deselect=tests/test_self.py::TestRunTC::test_do_not_import_files_from_local_directory[args0] \ |
| 126 | + --deselect=tests/test_self.py::TestRunTC::test_do_not_import_files_from_local_directory[args1] \ |
| 127 | + --deselect=tests/test_self.py::TestRunTC::test_progress_reporting \ |
| 128 | + --deselect=tests/pyreverse/test_diadefs.py::TestDefaultDiadefGenerator::test_functional_relation_extraction |
89 | 129 |
|
90 | 130 | %files |
91 | | -%doc README.rst ChangeLog examples elisp |
92 | | -%license COPYING |
93 | | -%{_bindir}/epylint |
| 131 | +%doc CONTRIBUTORS.txt |
| 132 | +%license LICENSE |
94 | 133 | %{_bindir}/pylint |
| 134 | +%{_bindir}/pylint-config |
95 | 135 | %{_bindir}/pyreverse |
96 | 136 | %{_bindir}/symilar |
97 | | -%{_mandir}/man1/epylint.1* |
98 | | -%{_mandir}/man1/pylint.1* |
99 | | -%{_mandir}/man1/pyreverse.1* |
100 | | -%{_mandir}/man1/symilar.1* |
101 | 137 |
|
102 | 138 | %files -n python3-%{name} |
103 | | -%license COPYING |
| 139 | +%license LICENSE |
104 | 140 | %{python3_sitelib}/pylint* |
105 | 141 | # backwards compatible versioned executables and manpages: |
106 | 142 | %{_bindir}/*-3 |
107 | 143 | %{_bindir}/*-%{python3_version} |
108 | | -%{_mandir}/man1/*-3.1* |
109 | | -%{_mandir}/man1/*-%{python3_version}.1* |
110 | 144 |
|
111 | 145 | %changelog |
| 146 | +* Tue Nov 11 2025 Akhila Guruju <[email protected]> - 4.0.2-2 |
| 147 | +- Upgrade to 4.0.2 by taking reference from Fedora 43 (license: MIT). |
| 148 | +- License verified |
| 149 | + |
112 | 150 | * Fri Oct 15 2021 Pawel Winogrodzki <[email protected]> - 2.4.4-4 |
113 | 151 | - Initial CBL-Mariner import from Fedora 32 (license: MIT). |
114 | 152 |
|
|
0 commit comments