]> git.pld-linux.org Git - packages/pylint.git/blame - pylint.spec
Version: 1.4.3
[packages/pylint.git] / pylint.spec
CommitLineData
bce5cba7
AF
1# TODO:
2# - include examples in package
f7cd7b16
JK
3
4# Conditional build:
5%bcond_without python2 # Python 2.x version
6%bcond_without python3 # Python 3.x version (available as 'py3lint')
7
baeb5efa 8Summary: Python tool that checks if a module satisfy a coding standard
24b2f055 9Summary(pl.UTF-8): Pythonowe narzędzie sprawdzające zgodność modułu ze standardem kodowania
baeb5efa 10Name: pylint
71480d3a
JK
11Version: 1.4.3
12Release: 1
e6bafd81 13License: GPL v2+
baeb5efa 14Group: Development/Languages/Python
59710151 15Source0: https://pypi.python.org/packages/source/p/pylint/pylint-%{version}.tar.gz
71480d3a 16# Source0-md5: 5924c1c7ca5ca23647812f5971d0ea44
ad173d2e 17URL: http://www.pylint.org/
f7cd7b16 18%if %{with python2}
2ae24f33 19BuildRequires: python-devel
e6bafd81 20BuildRequires: python-modules >= 1:2.5
71480d3a 21BuildRequires: python-setuptools >= 7.0
f7cd7b16
JK
22%endif
23%if %{with python3}
26ceed71 24BuildRequires: python3-2to3
f7cd7b16 25BuildRequires: python3-devel
f7cd7b16 26BuildRequires: python3-modules >= 1:3.2
71480d3a 27BuildRequires: python3-setuptools >= 7.0
f7cd7b16 28%endif
2ae24f33 29BuildRequires: rpm-pythonprov
7c199dbc 30BuildRequires: rpmbuild(macros) >= 1.219
ad173d2e 31BuildRequires: sphinx-pdg
61aac75d 32Requires: python-astroid >= 1.3.2
87946be2 33Requires: python-logilab-common >= 0.53.0
704b7472 34Requires: python-modules
61aac75d 35Requires: python-six
93850ade 36Suggests: python-devel-src
baeb5efa 37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
1ee582a8
ER
40# /etc/pylintrc is deliberately packaged to both packages with same name
41%define _duplicate_files_terminate_build 0
42
baeb5efa 43%description
44Python tool that checks if a module satisfy a coding standard.
45
65b81fbb 46%description -l pl.UTF-8
704b7472
ER
47Narzędzie sprawdzające zgodność modułów napisanych w języku Python z
48regułami tworzenia kodu źródłowego.
c85c0a5a 49
7c199dbc
KK
50%package gui
51Summary: GUI for pylint
24b2f055 52Summary(pl.UTF-8): Graficzny interfejs użytkownika dla pylinta
7c199dbc
KK
53Group: Development/Languages/Python
54Requires: %{name} = %{version}-%{release}
55Requires: python-tkinter
56
57%description gui
58Tk based GUI for pylint.
59
65b81fbb
JR
60%description gui -l pl.UTF-8
61Oparty na bibliotece Tk graficzny interfejs użytkownika dla pylinta.
7c199dbc 62
704b7472 63%package -n py3lint
f7cd7b16
JK
64Summary: Python tool that checks if a module satisfy a coding standard
65Summary(pl.UTF-8): Pythonowe narzędzie sprawdzające zgodność modułu ze standardem kodowania
66Group: Development/Languages/Python
61aac75d 67Requires: python3-astroid >= 1.3.2
f7cd7b16 68Requires: python3-logilab-common >= 0.53.0
61aac75d 69Requires: python3-six
704b7472 70Obsoletes: pylint-python3 < 1.0.0-2
f7cd7b16 71
704b7472 72%description -n py3lint
f7cd7b16
JK
73Python tool that checks if a module satisfy a coding standard.
74
75Python 3.x version, available via the 'py3lint' command.
76
704b7472
ER
77%description -n py3lint -l pl.UTF-8
78Narzędzie sprawdzające zgodność modułów napisanych w języku Python z
79regułami tworzenia kodu źródłowego.
f7cd7b16
JK
80
81Wersja dla Pythona 3.x, dostępna przez polecenie 'py3lint'.
82
704b7472 83%package -n py3lint-gui
f7cd7b16
JK
84Summary: GUI for pylint
85Summary(pl.UTF-8): Graficzny interfejs użytkownika dla pylinta
86Group: Development/Languages/Python
704b7472 87Requires: py3lint = %{version}-%{release}
f7cd7b16 88Requires: python3-tkinter
704b7472 89Obsoletes: pylint-python3-gui < 1.0.0-2
f7cd7b16 90
704b7472 91%description -n py3lint-gui
f7cd7b16
JK
92Tk based GUI for pylint.
93
704b7472 94%description -n py3lint-gui -l pl.UTF-8
f7cd7b16
JK
95Oparty na bibliotece Tk graficzny interfejs użytkownika dla pylinta.
96
baeb5efa 97%prep
59710151 98%setup -q
8b70ac82 99
baeb5efa 100%build
f7cd7b16
JK
101%if %{with python2}
102%{__python} setup.py build
cba3691d
JK
103%else
104# for sphinx
105install -d build/lib
106ln -sf ../.. build/lib/pylint
f7cd7b16
JK
107%endif
108
109%if %{with python3}
110export NO_SETUPTOOLS=1
111%{__python3} setup.py build --build-base=build3
112unset NO_SETUPTOOLS
113%endif
baeb5efa 114
cba3691d 115export PYTHONPATH=$PWD/build/lib
ad173d2e
AM
116%{__make} -C doc text
117
baeb5efa 118%install
704b7472 119rm -rf $RPM_BUILD_ROOT
baeb5efa 120rm -rf $RPM_BUILD_ROOT
4ec6f79e 121install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1}
baeb5efa 122
f7cd7b16
JK
123%if %{with python3}
124export NO_SETUPTOOLS=1
125%{__python3} setup.py build --build-base=build3 install \
2ae24f33
KK
126 --optimize=2 \
127 --root=$RPM_BUILD_ROOT
4efaa76d 128
f7cd7b16
JK
129unset NO_SETUPTOOLS
130mv $RPM_BUILD_ROOT%{_bindir}/epylint $RPM_BUILD_ROOT%{_bindir}/epy3lint
131mv $RPM_BUILD_ROOT%{_bindir}/pylint $RPM_BUILD_ROOT%{_bindir}/py3lint
132mv $RPM_BUILD_ROOT%{_bindir}/pylint-gui $RPM_BUILD_ROOT%{_bindir}/py3lint-gui
133mv $RPM_BUILD_ROOT%{_bindir}/pyreverse $RPM_BUILD_ROOT%{_bindir}/py3reverse
704b7472
ER
134cp -p man/epylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/epy3lint.1
135cp -p man/pylint.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3lint.1
136cp -p man/pylint-gui.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3lint-gui.1
137cp -p man/pyreverse.1 $RPM_BUILD_ROOT%{_mandir}/man1/py3reverse.1
f7cd7b16 138%endif
4efaa76d 139
f7cd7b16
JK
140%if %{with python2}
141%{__python} setup.py install \
142 --optimize=2 \
143 --root=$RPM_BUILD_ROOT
7c199dbc 144%py_postclean
704b7472 145cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
f7cd7b16
JK
146%endif
147
704b7472 148cp -p examples/pylintrc $RPM_BUILD_ROOT%{_sysconfdir}/pylintrc
baeb5efa 149
150%clean
151rm -rf $RPM_BUILD_ROOT
152
f7cd7b16 153%if %{with python2}
baeb5efa 154%files
155%defattr(644,root,root,755)
abbf502b 156%doc ChangeLog README examples/* doc/_build/text/*.txt
ebaa5e6b 157%attr(755,root,root) %{_bindir}/epylint
7c199dbc 158%attr(755,root,root) %{_bindir}/pylint
ebaa5e6b 159%attr(755,root,root) %{_bindir}/pyreverse
7c199dbc 160%attr(755,root,root) %{_bindir}/symilar
b4896848 161%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
6abb03ef
JB
162%{py_sitescriptdir}/pylint
163%{py_sitescriptdir}/pylint-%{version}-py*.egg-info
164%{_mandir}/man1/epylint.1*
165%{_mandir}/man1/pylint.1*
166%{_mandir}/man1/pyreverse.1*
167%{_mandir}/man1/symilar.1*
7c199dbc
KK
168
169%files gui
170%defattr(644,root,root,755)
171%attr(755,root,root) %{_bindir}/pylint-gui
6abb03ef 172%{_mandir}/man1/pylint-gui.1*
f7cd7b16
JK
173%endif
174
175%if %{with python3}
704b7472 176%files -n py3lint
f7cd7b16 177%defattr(644,root,root,755)
abbf502b 178%doc ChangeLog README examples/* doc/_build/text/*.txt
f7cd7b16
JK
179%attr(755,root,root) %{_bindir}/epy3lint
180%attr(755,root,root) %{_bindir}/py3lint
181%attr(755,root,root) %{_bindir}/py3reverse
704b7472 182%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pylintrc
f7cd7b16
JK
183%{py3_sitescriptdir}/pylint
184%{py3_sitescriptdir}/pylint-%{version}-py*.egg-info
185%{_mandir}/man1/epy3lint.1*
186%{_mandir}/man1/py3lint.1*
187%{_mandir}/man1/py3reverse.1*
188
704b7472 189%files -n py3lint-gui
f7cd7b16
JK
190%defattr(644,root,root,755)
191%attr(755,root,root) %{_bindir}/py3lint-gui
192%{_mandir}/man1/py3lint-gui.1*
193%endif
This page took 0.191239 seconds and 4 git commands to generate.