]> git.pld-linux.org Git - packages/python-pylint.git/blob - python-pylint.spec
- remove conflicting BRs
[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 %endif
160
161 %if %{with python3}
162 %py3_install
163
164 for tool in epylint pylint pyreverse symilar ; do
165         %{__mv} $RPM_BUILD_ROOT%{_bindir}/${tool} $RPM_BUILD_ROOT%{_bindir}/${tool}-3
166         cp -p man/${tool}.1 $RPM_BUILD_ROOT%{_mandir}/man1/${tool}-3.1
167 done
168 # old PLD package compatibility
169 ln -s epylint-3 $RPM_BUILD_ROOT%{_bindir}/epy3lint
170 ln -s pylint-3 $RPM_BUILD_ROOT%{_bindir}/py3lint
171 ln -s pyreverse-3 $RPM_BUILD_ROOT%{_bindir}/py3reverse
172 echo '.so epylint-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1
173 echo '.so pylint-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1
174 echo '.so pyreverse-3.1' >$RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1
175
176 cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc-3
177 %endif
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %if %{with python2}
183 %files
184 %defattr(644,root,root,755)
185 %doc ChangeLog README.rst examples
186 %{py_sitescriptdir}/pylint
187 %{py_sitescriptdir}/pylint-%{version}-py*.egg-info
188
189 %files -n py2lint
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{_bindir}/epylint-2
192 %attr(755,root,root) %{_bindir}/pylint-2
193 %attr(755,root,root) %{_bindir}/pyreverse-2
194 %attr(755,root,root) %{_bindir}/symilar-2
195 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc-2
196 %{_mandir}/man1/epylint-2.1*
197 %{_mandir}/man1/pylint-2.1*
198 %{_mandir}/man1/pyreverse-2.1*
199 %{_mandir}/man1/symilar-2.1*
200 %endif
201
202 %if %{with python3}
203 %files -n python3-pylint
204 %defattr(644,root,root,755)
205 %doc ChangeLog README.rst examples
206 %{py3_sitescriptdir}/pylint
207 %{py3_sitescriptdir}/pylint-%{version}-py*.egg-info
208
209 %files -n py3lint
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{_bindir}/epylint-3
212 %attr(755,root,root) %{_bindir}/pylint-3
213 %attr(755,root,root) %{_bindir}/pyreverse-3
214 %attr(755,root,root) %{_bindir}/symilar-3
215 %attr(755,root,root) %{_bindir}/epy3lint
216 %attr(755,root,root) %{_bindir}/py3lint
217 %attr(755,root,root) %{_bindir}/py3reverse
218 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc-3
219 %{_mandir}/man1/epylint-3.1*
220 %{_mandir}/man1/pylint-3.1*
221 %{_mandir}/man1/pyreverse-3.1*
222 %{_mandir}/man1/symilar-3.1*
223 %{_mandir}/man1/epy3lint.1*
224 %{_mandir}/man1/py3lint.1*
225 %{_mandir}/man1/py3reverse.1*
226 %endif
227
228 %if %{with doc}
229 %files doc
230 %defattr(644,root,root,755)
231 %doc doc/_build/text/*
232 %endif
This page took 0.111524 seconds and 3 git commands to generate.