]>
Commit | Line | Data |
---|---|---|
b50e5110 | 1 | # |
f7cd7b16 | 2 | # Conditional build: |
b50e5110 | 3 | %bcond_without doc # Sphinx documentation |
9101e20c | 4 | %bcond_with tests # unit tests |
f7cd7b16 | 5 | |
b50e5110 JB |
6 | Summary: Python tool that checks if a module satisfy a coding standard |
7 | Summary(pl.UTF-8): Narzędzie Pythona sprawdzające zgodność modułu ze standardem kodowania | |
baeb5efa | 8 | Name: pylint |
966cfc11 | 9 | Version: 2.12.2 |
3de32017 | 10 | Release: 1 |
e6bafd81 | 11 | License: GPL v2+ |
baeb5efa | 12 | Group: Development/Languages/Python |
9101e20c | 13 | #Source0Download: https://pypi.org/simple/pylint/ |
966cfc11 JP |
14 | Source0: https://github.com/PyCQA/pylint/archive/v%{version}/%{name}-%{version}.tar.gz |
15 | # Source0-md5: 655504bea72f87c9fbe604fcbfb5434f | |
b9af353d JB |
16 | URL: https://www.pylint.org/ |
17 | BuildRequires: python3-devel >= 1:3.6.2 | |
9101e20c | 18 | BuildRequires: python3-modules >= 1:3.5 |
4ccf6437 | 19 | BuildRequires: python3-setuptools >= 1:7.0 |
f8bbbbb3 | 20 | %if %{with tests} || %{with doc} |
b9af353d JB |
21 | BuildRequires: python3-astroid >= 2.5.1 |
22 | BuildRequires: python3-astroid < 2.10 | |
9101e20c | 23 | BuildRequires: python3-isort >= 4.2.5 |
b9af353d | 24 | BuildRequires: python3-isort < 6 |
9101e20c | 25 | BuildRequires: python3-mccabe >= 0.6 |
b9af353d | 26 | BuildRequires: python3-mccabe < 0.7 |
966cfc11 | 27 | BuildRequires: python3-platformdirs >= 2.2.0 |
b9af353d JB |
28 | BuildRequires: python3-toml >= 0.9.2 |
29 | BuildRequires: python3-typing_extensions >= 3.10.0 | |
30 | %endif | |
31 | %if %{with tests} | |
32 | BuildRequires: python3-pytest | |
9101e20c | 33 | %endif |
2ae24f33 | 34 | BuildRequires: rpm-pythonprov |
9101e20c JB |
35 | BuildRequires: rpmbuild(macros) >= 1.714 |
36 | %if %{with doc} | |
b9af353d | 37 | BuildRequires: sphinx-pdg-3 |
9101e20c | 38 | %endif |
b50e5110 | 39 | Requires: py3lint = %{version}-%{release} |
baeb5efa | 40 | BuildArch: noarch |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
42 | ||
43 | %description | |
b50e5110 | 44 | Python tool that checks if a module satisfy a coding standard. |
baeb5efa | 45 | |
65b81fbb | 46 | %description -l pl.UTF-8 |
b50e5110 | 47 | Narzędzie Pythona sprawdzające zgodność modułów napisanych w języku |
df0ba447 | 48 | Python z regułami tworzenia kodu źródłowego. |
345b7a9d | 49 | |
704b7472 | 50 | %package -n py3lint |
df0ba447 JB |
51 | Summary: Python 3 tool that checks if a module satisfy a coding standard |
52 | Summary(pl.UTF-8): Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania | |
f7cd7b16 | 53 | Group: Development/Languages/Python |
345b7a9d | 54 | Requires: python3-pylint = %{version}-%{release} |
704b7472 | 55 | Obsoletes: pylint-python3 < 1.0.0-2 |
f7cd7b16 | 56 | |
704b7472 | 57 | %description -n py3lint |
df0ba447 | 58 | Python 3 tool that checks if a module satisfy a coding standard. |
f7cd7b16 JK |
59 | |
60 | Python 3.x version, available via the 'py3lint' command. | |
61 | ||
704b7472 | 62 | %description -n py3lint -l pl.UTF-8 |
df0ba447 JB |
63 | Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku |
64 | Python z regułami tworzenia kodu źródłowego. | |
f7cd7b16 JK |
65 | |
66 | Wersja dla Pythona 3.x, dostępna przez polecenie 'py3lint'. | |
67 | ||
345b7a9d | 68 | %package -n python3-pylint |
df0ba447 JB |
69 | Summary: Python 3 tool that checks if a module satisfy a coding standard (moduły) |
70 | Summary(pl.UTF-8): Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania (modules) | |
345b7a9d | 71 | Group: Libraries/Python |
b9af353d | 72 | Requires: python3-modules >= 1:3.6.2 |
345b7a9d JK |
73 | |
74 | %description -n python3-pylint | |
df0ba447 | 75 | Python 3 tool that checks if a module satisfy a coding standard. |
345b7a9d | 76 | |
df0ba447 | 77 | This package contains only the Python modules used by the tool. |
345b7a9d JK |
78 | |
79 | %description -n python3-pylint -l pl.UTF-8 | |
df0ba447 JB |
80 | Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku |
81 | Python z regułami tworzenia kodu źródłowego. | |
345b7a9d | 82 | |
df0ba447 | 83 | Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie. |
345b7a9d | 84 | |
9101e20c JB |
85 | %package doc |
86 | Summary: Documentation for pylint | |
87 | Summary(pl.UTF-8): Dokumentacja do pylinta | |
88 | Group: Documentation | |
89 | ||
90 | %description doc | |
91 | Documentation for pylint. | |
92 | ||
93 | %description doc -l pl.UTF-8 | |
94 | Dokumentacja do pylinta. | |
95 | ||
baeb5efa | 96 | %prep |
966cfc11 | 97 | %setup -q |
8b70ac82 | 98 | |
baeb5efa | 99 | %build |
15bfcc2d | 100 | %py3_build |
baeb5efa | 101 | |
e0de7fee | 102 | %if %{with doc} |
e1ce958c | 103 | %{__make} -C doc text \ |
b9af353d JB |
104 | PYTHONPATH=$PWD \ |
105 | SPHINXBUILD=sphinx-build-3 | |
e0de7fee | 106 | %endif |
ad173d2e | 107 | |
baeb5efa | 108 | %install |
704b7472 | 109 | rm -rf $RPM_BUILD_ROOT |
966cfc11 | 110 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
baeb5efa | 111 | |
15bfcc2d | 112 | %py3_install |
4efaa76d | 113 | |
b50e5110 JB |
114 | for tool in epylint pylint pyreverse symilar ; do |
115 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/${tool} $RPM_BUILD_ROOT%{_bindir}/${tool}-3 | |
116 | ln -s ${tool}-3 $RPM_BUILD_ROOT%{_bindir}/${tool} | |
b50e5110 JB |
117 | done |
118 | # old PLD package compatibility | |
119 | ln -s epylint-3 $RPM_BUILD_ROOT%{_bindir}/epy3lint | |
120 | ln -s pylint-3 $RPM_BUILD_ROOT%{_bindir}/py3lint | |
121 | ln -s pyreverse-3 $RPM_BUILD_ROOT%{_bindir}/py3reverse | |
f7cd7b16 | 122 | |
704b7472 | 123 | cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc |
baeb5efa | 124 | |
125 | %clean | |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
128 | %files | |
129 | %defattr(644,root,root,755) | |
ebaa5e6b | 130 | %attr(755,root,root) %{_bindir}/epylint |
7c199dbc | 131 | %attr(755,root,root) %{_bindir}/pylint |
ebaa5e6b | 132 | %attr(755,root,root) %{_bindir}/pyreverse |
7c199dbc | 133 | %attr(755,root,root) %{_bindir}/symilar |
7c199dbc | 134 | |
704b7472 | 135 | %files -n py3lint |
f7cd7b16 | 136 | %defattr(644,root,root,755) |
b50e5110 JB |
137 | %attr(755,root,root) %{_bindir}/epylint-3 |
138 | %attr(755,root,root) %{_bindir}/pylint-3 | |
139 | %attr(755,root,root) %{_bindir}/pyreverse-3 | |
140 | %attr(755,root,root) %{_bindir}/symilar-3 | |
f7cd7b16 JK |
141 | %attr(755,root,root) %{_bindir}/epy3lint |
142 | %attr(755,root,root) %{_bindir}/py3lint | |
143 | %attr(755,root,root) %{_bindir}/py3reverse | |
704b7472 | 144 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc |
f7cd7b16 | 145 | |
345b7a9d JK |
146 | %files -n python3-pylint |
147 | %defattr(644,root,root,755) | |
b50e5110 | 148 | %doc CONTRIBUTORS.txt ChangeLog README.rst examples |
345b7a9d JK |
149 | %{py3_sitescriptdir}/pylint |
150 | %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info | |
9101e20c JB |
151 | |
152 | %if %{with doc} | |
153 | %files doc | |
154 | %defattr(644,root,root,755) | |
155 | %doc doc/_build/text/* | |
156 | %endif |