]>
Commit | Line | Data |
---|---|---|
bce5cba7 AF |
1 | # TODO: |
2 | # - include examples in package | |
f7cd7b16 JK |
3 | |
4 | # Conditional build: | |
5 | %bcond_without python2 # Python 2.x version | |
6 | %bcond_without python3 # Python 3.x version (available as 'py3lint') | |
e0de7fee | 7 | %bcond_without doc # Documentation |
f7cd7b16 | 8 | |
df0ba447 JB |
9 | Summary: Python 2 tool that checks if a module satisfy a coding standard |
10 | Summary(pl.UTF-8): Narzędzie Pythona 2 sprawdzające zgodność modułu ze standardem kodowania | |
baeb5efa | 11 | Name: pylint |
b0e6a315 | 12 | Version: 2.4.3 |
e1a36fcf | 13 | Release: 2 |
e6bafd81 | 14 | License: GPL v2+ |
baeb5efa | 15 | Group: Development/Languages/Python |
6ea1b8d5 | 16 | #Source0Download: https://pypi.python.org/pypi/pylint |
19641c03 | 17 | Source0: https://github.com/PyCQA/pylint/archive/%{name}-%{version}.tar.gz |
b0e6a315 | 18 | # Source0-md5: 742ac2d6e2528e0d2f52edadd31c837b |
ad173d2e | 19 | URL: http://www.pylint.org/ |
f7cd7b16 | 20 | %if %{with python2} |
bc8a8990 | 21 | BuildRequires: python-astroid >= 1.5.3 |
19641c03 MK |
22 | BuildRequires: python-certifi >= 2017.4.17 |
23 | BuildRequires: python-chardet >= 3.0.2 | |
2ae24f33 | 24 | BuildRequires: python-devel |
19641c03 MK |
25 | BuildRequires: python-idna >= 2.5 |
26 | BuildRequires: python-isort | |
27 | BuildRequires: python-lazy-object-proxy | |
28 | BuildRequires: python-mccabe | |
e6bafd81 | 29 | BuildRequires: python-modules >= 1:2.5 |
71480d3a | 30 | BuildRequires: python-setuptools >= 7.0 |
19641c03 | 31 | BuildRequires: python-wrapt |
e0de7fee MK |
32 | #BuildConflicts: python-chardet >= 3.1.0 |
33 | #BuildConflicts: python-idna >= 2.7 | |
f7cd7b16 JK |
34 | %endif |
35 | %if %{with python3} | |
26ceed71 | 36 | BuildRequires: python3-2to3 |
bc8a8990 | 37 | BuildRequires: python3-astroid >= 1.5.3 |
19641c03 MK |
38 | BuildRequires: python3-certifi >= 2017.4.17 |
39 | BuildRequires: python3-chardet >= 3.0.2 | |
f7cd7b16 | 40 | BuildRequires: python3-devel |
19641c03 MK |
41 | BuildRequires: python3-idna >= 2.5 |
42 | BuildRequires: python3-isort | |
43 | BuildRequires: python3-lazy-object-proxy | |
44 | BuildRequires: python3-mccabe | |
f7cd7b16 | 45 | BuildRequires: python3-modules >= 1:3.2 |
71480d3a | 46 | BuildRequires: python3-setuptools >= 7.0 |
19641c03 | 47 | BuildRequires: python3-wrapt |
e0de7fee MK |
48 | #BuildConflicts: python3-chardet >= 3.1.0 |
49 | #BuildConflicts: python3-idna >= 2.7 | |
f7cd7b16 | 50 | %endif |
2ae24f33 | 51 | BuildRequires: rpm-pythonprov |
7c199dbc | 52 | BuildRequires: rpmbuild(macros) >= 1.219 |
ad173d2e | 53 | BuildRequires: sphinx-pdg |
345b7a9d | 54 | Requires: python-pylint = %{version}-%{release} |
93850ade | 55 | Suggests: python-devel-src |
baeb5efa | 56 | BuildArch: noarch |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
58 | ||
1ee582a8 ER |
59 | # /etc/pylintrc is deliberately packaged to both packages with same name |
60 | %define _duplicate_files_terminate_build 0 | |
61 | ||
bc8a8990 JK |
62 | # current Python 3.x provides all these |
63 | %define _noautoreq python3egg.backports.functools-lru-cache python3egg.configparser python3egg.singledispatch | |
64 | ||
baeb5efa | 65 | %description |
df0ba447 | 66 | Python 2 tool that checks if a module satisfy a coding standard. |
baeb5efa | 67 | |
65b81fbb | 68 | %description -l pl.UTF-8 |
df0ba447 JB |
69 | Narzędzie Pythona 2 sprawdzające zgodność modułów napisanych w języku |
70 | Python z regułami tworzenia kodu źródłowego. | |
c85c0a5a | 71 | |
345b7a9d | 72 | %package -n python-pylint |
df0ba447 JB |
73 | Summary: Python 2 tool that checks if a module satisfy a coding standard (modules) |
74 | Summary(pl.UTF-8): Narzędzie Pythona sprawdzające zgodność modułu ze standardem kodowania (moduły) | |
345b7a9d JK |
75 | Group: Libraries/Python |
76 | ||
77 | %description -n python-pylint | |
df0ba447 | 78 | Python 2 tool that checks if a module satisfy a coding standard. |
345b7a9d | 79 | |
df0ba447 | 80 | This package contains only the Python modules used by the tool. |
345b7a9d JK |
81 | |
82 | %description -n python-pylint -l pl.UTF-8 | |
df0ba447 JB |
83 | Narzędzie Pythona 2 sprawdzające zgodność modułów napisanych w języku |
84 | Python z regułami tworzenia kodu źródłowego. | |
345b7a9d | 85 | |
df0ba447 | 86 | Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie. |
345b7a9d | 87 | |
704b7472 | 88 | %package -n py3lint |
df0ba447 JB |
89 | Summary: Python 3 tool that checks if a module satisfy a coding standard |
90 | Summary(pl.UTF-8): Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania | |
f7cd7b16 | 91 | Group: Development/Languages/Python |
345b7a9d | 92 | Requires: python3-pylint = %{version}-%{release} |
704b7472 | 93 | Obsoletes: pylint-python3 < 1.0.0-2 |
f7cd7b16 | 94 | |
704b7472 | 95 | %description -n py3lint |
df0ba447 | 96 | Python 3 tool that checks if a module satisfy a coding standard. |
f7cd7b16 JK |
97 | |
98 | Python 3.x version, available via the 'py3lint' command. | |
99 | ||
704b7472 | 100 | %description -n py3lint -l pl.UTF-8 |
df0ba447 JB |
101 | Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku |
102 | Python z regułami tworzenia kodu źródłowego. | |
f7cd7b16 JK |
103 | |
104 | Wersja dla Pythona 3.x, dostępna przez polecenie 'py3lint'. | |
105 | ||
345b7a9d | 106 | %package -n python3-pylint |
df0ba447 JB |
107 | Summary: Python 3 tool that checks if a module satisfy a coding standard (moduły) |
108 | Summary(pl.UTF-8): Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania (modules) | |
345b7a9d JK |
109 | Group: Libraries/Python |
110 | ||
111 | %description -n python3-pylint | |
df0ba447 | 112 | Python 3 tool that checks if a module satisfy a coding standard. |
345b7a9d | 113 | |
df0ba447 | 114 | This package contains only the Python modules used by the tool. |
345b7a9d JK |
115 | |
116 | %description -n python3-pylint -l pl.UTF-8 | |
df0ba447 JB |
117 | Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku |
118 | Python z regułami tworzenia kodu źródłowego. | |
345b7a9d | 119 | |
df0ba447 | 120 | Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie. |
345b7a9d | 121 | |
baeb5efa | 122 | %prep |
19641c03 | 123 | %setup -q -n pylint-pylint-%{version} |
8b70ac82 | 124 | |
baeb5efa | 125 | %build |
f7cd7b16 | 126 | %if %{with python2} |
15bfcc2d | 127 | %py_build |
f7cd7b16 JK |
128 | %endif |
129 | ||
130 | %if %{with python3} | |
15bfcc2d | 131 | %py3_build |
f7cd7b16 | 132 | %endif |
baeb5efa | 133 | |
e0de7fee | 134 | %if %{with doc} |
e1ce958c | 135 | %{__make} -C doc text \ |
15bfcc2d | 136 | PYTHONPATH=$PWD |
e0de7fee | 137 | %endif |
ad173d2e | 138 | |
baeb5efa | 139 | %install |
704b7472 | 140 | rm -rf $RPM_BUILD_ROOT |
4ec6f79e | 141 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} |
baeb5efa | 142 | |
f7cd7b16 | 143 | %if %{with python3} |
15bfcc2d | 144 | %py3_install |
4efaa76d | 145 | |
df0ba447 JB |
146 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/epylint $RPM_BUILD_ROOT%{_bindir}/epy3lint |
147 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/pylint $RPM_BUILD_ROOT%{_bindir}/py3lint | |
df0ba447 | 148 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyreverse $RPM_BUILD_ROOT%{_bindir}/py3reverse |
704b7472 ER |
149 | cp -p man/epylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1 |
150 | cp -p man/pylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1 | |
704b7472 | 151 | cp -p man/pyreverse.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1 |
f7cd7b16 | 152 | %endif |
4efaa76d | 153 | |
f7cd7b16 | 154 | %if %{with python2} |
15bfcc2d | 155 | %py_install |
7c199dbc | 156 | %py_postclean |
704b7472 | 157 | cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
f7cd7b16 JK |
158 | %endif |
159 | ||
704b7472 | 160 | cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc |
baeb5efa | 161 | |
162 | %clean | |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
f7cd7b16 | 165 | %if %{with python2} |
baeb5efa | 166 | %files |
167 | %defattr(644,root,root,755) | |
e0de7fee MK |
168 | %doc ChangeLog README.rst examples/* |
169 | %{?with_doc:%doc doc/_build/text/*.txt} | |
ebaa5e6b | 170 | %attr(755,root,root) %{_bindir}/epylint |
7c199dbc | 171 | %attr(755,root,root) %{_bindir}/pylint |
ebaa5e6b | 172 | %attr(755,root,root) %{_bindir}/pyreverse |
7c199dbc | 173 | %attr(755,root,root) %{_bindir}/symilar |
b4896848 | 174 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc |
6abb03ef JB |
175 | %{_mandir}/man1/epylint.1* |
176 | %{_mandir}/man1/pylint.1* | |
177 | %{_mandir}/man1/pyreverse.1* | |
178 | %{_mandir}/man1/symilar.1* | |
7c199dbc | 179 | |
345b7a9d JK |
180 | %files -n python-pylint |
181 | %defattr(644,root,root,755) | |
182 | %{py_sitescriptdir}/pylint | |
183 | %{py_sitescriptdir}/pylint-%{version}-py*.egg-info | |
f7cd7b16 JK |
184 | %endif |
185 | ||
186 | %if %{with python3} | |
704b7472 | 187 | %files -n py3lint |
f7cd7b16 | 188 | %defattr(644,root,root,755) |
e0de7fee MK |
189 | %doc ChangeLog README.rst examples/* |
190 | %{?with_doc:%doc doc/_build/text/*.txt} | |
f7cd7b16 JK |
191 | %attr(755,root,root) %{_bindir}/epy3lint |
192 | %attr(755,root,root) %{_bindir}/py3lint | |
193 | %attr(755,root,root) %{_bindir}/py3reverse | |
704b7472 | 194 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc |
f7cd7b16 JK |
195 | %{_mandir}/man1/epy3lint.1* |
196 | %{_mandir}/man1/py3lint.1* | |
197 | %{_mandir}/man1/py3reverse.1* | |
198 | ||
345b7a9d JK |
199 | %files -n python3-pylint |
200 | %defattr(644,root,root,755) | |
201 | %{py3_sitescriptdir}/pylint | |
202 | %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info | |
f7cd7b16 | 203 | %endif |