forked from pool/python-pylint
Drop _link after Factory removal
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=52
This commit is contained in:
committed by
Git OBS Bridge
parent
d33a936048
commit
fd5a8b452d
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pylint (Version 0.18.1)
|
||||
# spec file for package python-pylint
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -15,34 +15,39 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: python-pylint
|
||||
BuildRequires: python-devel
|
||||
%define modname pylint
|
||||
Name: python-%{modname}
|
||||
Version: 1.0.0
|
||||
Release: 0
|
||||
Summary: Syntax and style checker for Python code
|
||||
Version: 0.19.0
|
||||
Release: 1
|
||||
Source: pylint-%{version}.tar.bz2
|
||||
License: GPL v2 or later
|
||||
License: GPL-2.0+
|
||||
Group: Development/Languages/Python
|
||||
Url: http://www.logilab.org/projects/pylint/
|
||||
Source: http://download.logilab.org/pub/%{modname}/%{modname}-%{version}.tar.gz
|
||||
BuildRequires: python-astroid
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-logilab-common >= 0.55
|
||||
BuildRequires: python-tk
|
||||
Requires: python-astroid
|
||||
Requires: python-logilab-common >= 0.55
|
||||
Requires: python-tk
|
||||
Provides: pylint = %{version}
|
||||
Obsoletes: pylint < %{version}
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: python-logilab-common >= 0.19.0
|
||||
Requires: python-logilab-astng >= 0.16.1
|
||||
Provides: pylint = 0.16.0
|
||||
Obsoletes: pylint <= 0.16.0
|
||||
%{py_requires}
|
||||
%if 0%suse_version > 1110
|
||||
%if 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%define py_sitedir %python_sitelib
|
||||
%endif
|
||||
|
||||
%description
|
||||
Pylint analyzes Python source code looking for bugs and signs of poor
|
||||
quality.
|
||||
|
||||
Pylint is a python tool that checks if a module satisfy a coding
|
||||
Pylint is a python tool that checks if a module satisfies a coding
|
||||
standard. Pylint can be seen as another PyChecker since nearly all
|
||||
tests you can do with PyChecker can also be done with Pylint. But
|
||||
Pylint offers some more features, like checking line-code's length,
|
||||
@@ -54,40 +59,66 @@ The big advantage with Pylint is that it is highly configurable,
|
||||
customizable, and you can easily write a small plugin to add a personal
|
||||
feature.
|
||||
|
||||
Please send any comment, patch or question to the python-projects
|
||||
mailing-list. Before asking a question, please first search the
|
||||
archives in case it would have already been answered. You may want to
|
||||
use google and add "site:lists.logilab.org" to your keywords to narrow
|
||||
your search. We will soon provide our own search engine.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Sylvain Th<EFBFBD>nault
|
||||
|
||||
%prep
|
||||
%setup -q -n pylint-%{version}
|
||||
#%patch
|
||||
%setup -q -n %{modname}-%{version}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
|
||||
%install
|
||||
#export PYTHONOPTIMIZE=1 #--optimize=1
|
||||
python setup.py install --prefix=%{_prefix} --root="$RPM_BUILD_ROOT"
|
||||
rm -rf $RPM_BUILD_ROOT/%{py_sitedir}/pylint/test/
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
# fix non-executable rpmlint warning
|
||||
chmod +x %{buildroot}%{python_sitelib}/%{modname}/epylint.py
|
||||
# update-alternatives
|
||||
mv %{buildroot}%{_bindir}/pylint %{buildroot}%{_bindir}/pylint-%{py_ver}
|
||||
mv %{buildroot}%{_bindir}/epylint %{buildroot}%{_bindir}/epylint-%{py_ver}
|
||||
mv %{buildroot}%{_bindir}/pylint-gui %{buildroot}%{_bindir}/pylint-gui-%{py_ver}
|
||||
mv %{buildroot}%{_bindir}/pyreverse %{buildroot}%{_bindir}/pyreverse-%{py_ver}
|
||||
mv %{buildroot}%{_bindir}/symilar %{buildroot}%{_bindir}/symilar-%{py_ver}
|
||||
ln -s %{_bindir}/pylint-%{py_ver} %{buildroot}%{_bindir}/pylint
|
||||
ln -s %{_bindir}/epylint-%{py_ver} %{buildroot}%{_bindir}/epylint
|
||||
ln -s %{_bindir}/pylint-gui-%{py_ver} %{buildroot}%{_bindir}/pylint-gui
|
||||
ln -s %{_bindir}/pyreverse-%{py_ver} %{buildroot}%{_bindir}/pyreverse
|
||||
ln -s %{_bindir}/symilar-%{py_ver} %{buildroot}%{_bindir}/symilar
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%pre
|
||||
# Since /usr/bin/pylint, etc. became ghosted to be used with update-alternatives, we have to get rid
|
||||
# of the old binary resulting from the non-update-alternativies-ified package:
|
||||
[[ ! -L %{_bindir}/pylint ]] && rm -f %{_bindir}/pylint
|
||||
[[ ! -L %{_bindir}/epylint ]] && rm -f %{_bindir}/epylint
|
||||
[[ ! -L %{_bindir}/pylint-gui ]] && rm -f %{_bindir}/pylint-gui
|
||||
[[ ! -L %{_bindir}/pyreverse ]] && rm -f %{_bindir}/pyreverse
|
||||
[[ ! -L %{_bindir}/symilar ]] && rm -f %{_bindir}/symilar
|
||||
exit 0
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/pylint pylint %{_bindir}/pylint-%{py_ver} 30 \
|
||||
--slave %{_bindir}/epylint epylint %{_bindir}/epylint-%{py_ver} \
|
||||
--slave %{_bindir}/pylint-gui pylint-gui %{_bindir}/pylint-gui-%{py_ver} \
|
||||
--slave %{_bindir}/pyreverse pyreverse %{_bindir}/pyreverse-%{py_ver} \
|
||||
--slave %{_bindir}/symilar symilar %{_bindir}/symilar-%{py_ver}
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove pylint %{_bindir}/pylint-%{py_ver}
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README ChangeLog examples/ doc/
|
||||
%{_bindir}/*
|
||||
%{py_sitedir}/pylint
|
||||
%if 0%suse_version > 1010
|
||||
%{py_sitedir}/*egg-info
|
||||
%endif
|
||||
%doc ChangeLog COPYING README examples/
|
||||
%{_bindir}/pylint-%{py_ver}
|
||||
%{_bindir}/epylint-%{py_ver}
|
||||
%{_bindir}/pylint-gui-%{py_ver}
|
||||
%{_bindir}/pyreverse-%{py_ver}
|
||||
%{_bindir}/symilar-%{py_ver}
|
||||
%ghost %{_bindir}/pylint
|
||||
%ghost %{_bindir}/epylint
|
||||
%ghost %{_bindir}/pylint-gui
|
||||
%ghost %{_bindir}/pyreverse
|
||||
%ghost %{_bindir}/symilar
|
||||
%{python_sitelib}/%{modname}/
|
||||
%{python_sitelib}/%{modname}-%{version}-py%{py_ver}.egg-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user