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