]> git.pld-linux.org Git - packages/python-pylint.git/blob - python-pylint.spec
- don't package unit test data
[packages/python-pylint.git] / python-pylint.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # Python 2.x version (available as 'py2lint')
4 %bcond_with     python3 # Python 3.x version (available as 'py3lint')
5 %bcond_without  doc     # Sphinx documentation
6
7 Summary:        Python 2 tool that checks if a module satisfy a coding standard
8 Summary(pl.UTF-8):      Narzędzie Pythona 2 sprawdzające zgodność modułu ze standardem kodowania
9 Name:           python-pylint
10 Version:        1.9.5
11 Release:        1
12 Epoch:          1
13 License:        GPL v2+
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/pylint
16 Source0:        https://github.com/PyCQA/pylint/archive/pylint-%{version}.tar.gz
17 # Source0-md5:  3db0fde1876d50ad313fd707ecd6562b
18 Patch0:         %{name}-rc.patch
19 URL:            http://www.pylint.org/
20 %if %{with python2}
21 BuildRequires:  python-devel >= 1:2.7
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-pytest-runner
24 BuildRequires:  python-setuptools >= 7.0
25 %if %{with tests} || %{with doc}
26 BuildRequires:  python-astroid >= 1.6.0
27 BuildRequires:  python-backports.functools_lru_cache
28 BuildRequires:  python-configparser
29 BuildRequires:  python-isort >= 4.2.5
30 BuildRequires:  python-mccabe
31 BuildRequires:  python-pytest
32 BuildRequires:  python-pytest-xdist
33 BuildRequires:  python-singledispatch
34 %endif
35 %endif
36 %if %{with python3}
37 BuildRequires:  python3-devel >= 1:3.4
38 BuildRequires:  python3-modules >= 1:3.4
39 BuildRequires:  python3-pytest-runner
40 BuildRequires:  python3-setuptools >= 7.0
41 %if %{with tests} || %{with doc}
42 BuildRequires:  python3-astroid >= 1.6.0
43 BuildRequires:  python3-isort >= 4.2.5
44 BuildRequires:  python3-pytest
45 BuildRequires:  python3-pytest-xdist
46 BuildRequires:  python3-mccabe
47 %endif
48 %endif
49 BuildRequires:  rpm-pythonprov
50 BuildRequires:  rpmbuild(macros) >= 1.714
51 %if %{with doc}
52 BuildRequires:  sphinx-pdg >= 1
53 %endif
54 Suggests:       python-devel-src
55 BuildArch:      noarch
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
59 Python 2 tool that checks if a module satisfy a coding standard.
60
61 This package contains only the Python modules used by the tool.
62
63 %description -l pl.UTF-8
64 Narzędzie Pythona 2 sprawdzające zgodność modułów napisanych w języku
65 Python z regułami tworzenia kodu źródłowego.
66
67 Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie.
68
69 %package -n py2lint
70 Summary:        Python 2 tool that checks if a module satisfy a coding standard (modules)
71 Summary(pl.UTF-8):      Narzędzie Pythona sprawdzające zgodność modułu ze standardem kodowania (moduły)
72 Group:          Libraries/Python
73 Requires:       %{name} = %{epoch}:%{version}-%{release}
74
75 %description -n py2lint
76 Python 2 tool that checks if a module satisfy a coding standard.
77
78 %description -n py2lint -l pl.UTF-8
79 Narzędzie Pythona 2 sprawdzające zgodność modułów napisanych w języku
80 Python z regułami tworzenia kodu źródłowego.
81
82 %package -n python3-pylint
83 Summary:        Python 3 tool that checks if a module satisfy a coding standard (moduły)
84 Summary(pl.UTF-8):      Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania (modules)
85 Group:          Libraries/Python
86
87 %description -n python3-pylint
88 Python 3 tool that checks if a module satisfy a coding standard.
89
90 This package contains only the Python modules used by the tool.
91
92 %description -n python3-pylint -l pl.UTF-8
93 Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku
94 Python z regułami tworzenia kodu źródłowego.
95
96 Ten pakiet zawiera tylko moduły Pythona używane przez to narzędzie.
97
98 %package -n py3lint
99 Summary:        Python 3 tool that checks if a module satisfy a coding standard
100 Summary(pl.UTF-8):      Narzędzie Pythona 3 sprawdzające zgodność modułu ze standardem kodowania
101 Group:          Development/Languages/Python
102 Requires:       python3-pylint = %{epoch}:%{version}-%{release}
103 Obsoletes:      pylint-python3 < 1.0.0-2
104
105 %description -n py3lint
106 Python 3 tool that checks if a module satisfy a coding standard.
107
108 Python 3.x version, available via the 'py3lint' command.
109
110 %description -n py3lint -l pl.UTF-8
111 Narzędzie Pythona 3 sprawdzające zgodność modułów napisanych w języku
112 Python z regułami tworzenia kodu źródłowego.
113
114 Wersja dla Pythona 3.x, dostępna przez polecenie 'py3lint'.
115
116 %package doc
117 Summary:        Documentation for pylint module and tool
118 Summary(pl.UTF-8):      Dokumentacja do modułu i narzędzia pylint
119 Group:          Documentation
120
121 %description doc
122 Documentation for pylint module and tool.
123
124 %description doc -l pl.UTF-8
125 Dokumentacja do modułu i narzędzia pylint.
126
127 %prep
128 %setup -q -n pylint-pylint-%{version}
129 %patch0 -p1
130
131 %build
132 %if %{with python2}
133 %py_build
134 %endif
135
136 %if %{with python3}
137 %py3_build
138 %endif
139
140 %if %{with doc}
141 %{__make} -C doc text \
142         PYTHONPATH=$PWD
143 %endif
144
145 %install
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1}
148
149 %if %{with python2}
150 %py_install
151 %py_postclean
152
153 for tool in epylint pylint pyreverse symilar ; do
154         %{__mv} $RPM_BUILD_ROOT%{_bindir}/${tool} $RPM_BUILD_ROOT%{_bindir}/${tool}-2
155         cp -p man/${tool}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${tool}-2.1
156 done
157
158 cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc-2
159
160 # don't package unit test data
161 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pylint/test
162 %endif
163
164 %if %{with python3}
165 %py3_install
166
167 for tool in epylint pylint pyreverse symilar ; do
168         %{__mv} $RPM_BUILD_ROOT%{_bindir}/${tool} $RPM_BUILD_ROOT%{_bindir}/${tool}-3
169         cp -p man/${tool}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${tool}-3.1
170 done
171 # old PLD package compatibility
172 ln -s epylint-3 $RPM_BUILD_ROOT%{_bindir}/epy3lint
173 ln -s pylint-3 $RPM_BUILD_ROOT%{_bindir}/py3lint
174 ln -s pyreverse-3 $RPM_BUILD_ROOT%{_bindir}/py3reverse
175 echo '.so epylint-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1
176 echo '.so pylint-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1
177 echo '.so pyreverse-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1
178
179 cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc-3
180
181 # don't package unit test data
182 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pylint/test
183 %endif
184
185 %clean
186 rm -rf $RPM_BUILD_ROOT
187
188 %if %{with python2}
189 %files
190 %defattr(644,root,root,755)
191 %doc ChangeLog README.rst examples
192 %{py_sitescriptdir}/pylint
193 %{py_sitescriptdir}/pylint-%{version}-py*.egg-info
194
195 %files -n py2lint
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/epylint-2
198 %attr(755,root,root) %{_bindir}/pylint-2
199 %attr(755,root,root) %{_bindir}/pyreverse-2
200 %attr(755,root,root) %{_bindir}/symilar-2
201 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc-2
202 %{_mandir}/man1/epylint-2.1*
203 %{_mandir}/man1/pylint-2.1*
204 %{_mandir}/man1/pyreverse-2.1*
205 %{_mandir}/man1/symilar-2.1*
206 %endif
207
208 %if %{with python3}
209 %files -n python3-pylint
210 %defattr(644,root,root,755)
211 %doc ChangeLog README.rst examples
212 %{py3_sitescriptdir}/pylint
213 %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info
214
215 %files -n py3lint
216 %defattr(644,root,root,755)
217 %attr(755,root,root) %{_bindir}/epylint-3
218 %attr(755,root,root) %{_bindir}/pylint-3
219 %attr(755,root,root) %{_bindir}/pyreverse-3
220 %attr(755,root,root) %{_bindir}/symilar-3
221 %attr(755,root,root) %{_bindir}/epy3lint
222 %attr(755,root,root) %{_bindir}/py3lint
223 %attr(755,root,root) %{_bindir}/py3reverse
224 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc-3
225 %{_mandir}/man1/epylint-3.1*
226 %{_mandir}/man1/pylint-3.1*
227 %{_mandir}/man1/pyreverse-3.1*
228 %{_mandir}/man1/symilar-3.1*
229 %{_mandir}/man1/epy3lint.1*
230 %{_mandir}/man1/py3lint.1*
231 %{_mandir}/man1/py3reverse.1*
232 %endif
233
234 %if %{with doc}
235 %files doc
236 %defattr(644,root,root,755)
237 %doc doc/_build/text/*
238 %endif
This page took 0.066061 seconds and 3 git commands to generate.