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