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