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