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