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