2009-09-09 16:57:28 +00:00
|
|
|
#
|
2014-02-24 02:22:25 +00:00
|
|
|
# spec file for package python-pylint
|
2009-09-09 16:57:28 +00:00
|
|
|
#
|
Accepting request 290392 from home:Nijel:branches:devel:languages:python
- Update to 1.4.2:
* Don't require a docstring for empty modules. Closes issue #261.
* Fix a false positive with `too-few-format-args` string warning,
emitted when the string format contained a normal positional
argument ('{0}'), mixed with a positional argument which did
an attribute access ('{0.__class__}').
Closes issue #463.
* Take in account all the methods from the ancestors
when checking for too-few-public-methods. Closes issue #471.
* Catch enchant errors and emit 'invalid-characters-in-docstring'
when checking for spelling errors. Closes issue #469.
* Use all the inferred statements for the super-init-not-called
check. Closes issue #389.
* Add a new warning, 'unichr-builtin', emitted by the Python 3
porting checker, when the unichr builtin is found. Closes issue #472.
* Add a new warning, 'intern-builtin', emitted by the Python 3
porting checker, when the intern builtin is found. Closes issue #473.
* Add support for editable installations.
* The HTML output accepts the `--msg-template` option. Patch by
Dan Goldsmith.
* Add 'map-builtin-not-iterating' (replacing 'implicit-map-evaluation'),
'zip-builtin-not-iterating', 'range-builtin-not-iterating', and
'filter-builtin-not-iterating' which are emitted by `--py3k` when the
appropriate built-in is not used in an iterating context (semantics
taken from 2to3).
* Add a new warning, 'unidiomatic-typecheck', emitted when an explicit
typecheck uses type() instead of isinstance(). For example,
`type(x) == Y` instead of `isinstance(x, Y)`. Patch by Chris Rebert.
Closes issue #299.
* Add support for combining the Python 3 checker mode with the --jobs
OBS-URL: https://build.opensuse.org/request/show/290392
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=60
2015-03-12 09:26:01 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2009-09-09 16:57:28 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-02-24 02:22:25 +00:00
|
|
|
%define modname pylint
|
|
|
|
Name: python-%{modname}
|
Accepting request 290987 from home:Nijel:branches:devel:languages:python
- Update to 1.4.3:
* Remove three warnings: star-args, abstract-class-little-used,
abstract-class-not-used. These warnings don't add any real value
and they don't imply errors or problems in the code.
* Added a new option for controlling the peephole optimizer in astroid.
The option ``--optimize-ast`` will control the peephole optimizer,
which is used to optimize a couple of AST subtrees. The current problem
solved by the peephole optimizer is when multiple joined strings,
with the addition operator, are encountered. If the numbers of such
strings is high enough, Pylint will then fail with a maximum recursion
depth exceeded error, due to its visitor architecture. The peephole
just transforms such calls, if it can, into the final resulting string
and this exhibit a problem, because the visit_binop method stops being
called (in the optimized AST it will be a Const node).
OBS-URL: https://build.opensuse.org/request/show/290987
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=61
2015-03-16 12:58:28 +00:00
|
|
|
Version: 1.4.3
|
2014-02-24 02:22:25 +00:00
|
|
|
Release: 0
|
2009-09-09 16:57:28 +00:00
|
|
|
Summary: Syntax and style checker for Python code
|
2014-02-24 02:22:25 +00:00
|
|
|
License: GPL-2.0+
|
2009-09-09 16:57:28 +00:00
|
|
|
Group: Development/Languages/Python
|
|
|
|
Url: http://www.logilab.org/projects/pylint/
|
2014-12-08 10:30:09 +00:00
|
|
|
Source: https://pypi.python.org/packages/source/p/pylint/pylint-%{version}.tar.gz
|
2014-08-12 13:50:15 +00:00
|
|
|
BuildRequires: python-astroid >= 1.2.0
|
2014-02-24 02:22:25 +00:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: python-logilab-common >= 0.55
|
|
|
|
BuildRequires: python-tk
|
2014-08-12 13:50:15 +00:00
|
|
|
Requires: python-astroid >= 1.2.0
|
2014-02-24 02:22:25 +00:00
|
|
|
Requires: python-logilab-common >= 0.55
|
2014-12-08 10:30:09 +00:00
|
|
|
Recommends: python-tk
|
2014-02-24 02:22:25 +00:00
|
|
|
Provides: pylint = %{version}
|
|
|
|
Obsoletes: pylint < %{version}
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2009-09-09 16:57:28 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-02-24 02:22:25 +00:00
|
|
|
%if 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
2009-09-09 19:18:16 +00:00
|
|
|
BuildArch: noarch
|
2009-09-09 16:57:28 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
Pylint analyzes Python source code looking for bugs and signs of poor
|
|
|
|
quality.
|
|
|
|
|
2014-02-24 02:22:25 +00:00
|
|
|
Pylint is a python tool that checks if a module satisfies a coding
|
2009-09-09 16:57:28 +00:00
|
|
|
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,
|
|
|
|
checking if variable names are well-formed according to your coding
|
|
|
|
standard, or checking if declared interfaces are truly implemented, and
|
|
|
|
much more (see the complete check list).
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
2014-02-24 02:22:25 +00:00
|
|
|
%setup -q -n %{modname}-%{version}
|
2009-09-09 16:57:28 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
#export PYTHONOPTIMIZE=1 #--optimize=1
|
2014-02-24 02:22:25 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
%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
|
2009-09-09 16:57:28 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2014-02-24 02:22:25 +00:00
|
|
|
%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
|
2009-09-09 16:57:28 +00:00
|
|
|
|
|
|
|
%changelog
|