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