forked from pool/python-pylint
- update for singlespec - enable test suite for all pythons - update to 1.7.0 git pre-release, for python 3.6 support (boo#1026174) * multitude of new checkers * support for namespace packages * dropped pylint-gui * see changes in /usr/share/doc/packages/python-pylint/ChangeLog OBS-URL: https://build.opensuse.org/request/show/479733 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=71
118 lines
3.7 KiB
RPMSpec
118 lines
3.7 KiB
RPMSpec
#
|
|
# spec file for package python-pylint
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-pylint
|
|
Version: 1.7.0~git.1489322553.d78e0130
|
|
Release: 0
|
|
Summary: Syntax and style checker for Python code
|
|
License: GPL-2.0+
|
|
Group: Development/Languages/Python
|
|
Url: https://github.com/pycqa/pylint
|
|
Source: https://files.pythonhosted.org/packages/source/p/pylint/pylint-%{version}.tar.gz
|
|
BuildRequires: %{python_module astroid}
|
|
BuildRequires: %{python_module six}
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requiremenst
|
|
BuildRequires: %{python_module editdistance}
|
|
BuildRequires: %{python_module isort >= 4.2.5}
|
|
BuildRequires: %{python_module mccabe}
|
|
BuildRequires: %{python_module pytest-runner}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python2-backports.functools_lru_cache
|
|
BuildRequires: python2-configparser
|
|
BuildRequires: python2-enum34
|
|
BuildRequires: python2-singledispatch
|
|
# test is checking that "tkinter.tix" is deprecated
|
|
BuildRequires: python3-tk
|
|
# /SECTION
|
|
Requires: python-astroid
|
|
Requires: python-editdistance
|
|
Requires: python-isort >= 4.2.5
|
|
Requires: python-mccabe
|
|
Requires: python-six
|
|
%ifpython2
|
|
Requires: python-backports.functools_lru_cache
|
|
Requires: python-configparser
|
|
Requires: python-enum34
|
|
Requires: python-singledispatch
|
|
%endif
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildArch: noarch
|
|
%ifpython2
|
|
Provides: pylint = %{version}
|
|
Obsoletes: pylint < %{version}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
Pylint analyzes Python source code looking for bugs and signs of poor
|
|
quality.
|
|
|
|
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,
|
|
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
|
|
%setup -q -n pylint-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
|
|
for p in pylint epylint pyreverse symilar ; do
|
|
%python_clone -a %{buildroot}%{_bindir}/$p
|
|
done
|
|
|
|
%fdupes %{buildroot}%{_prefix}
|
|
|
|
%post
|
|
%python_install_alternative pylint epylint pyreverse symilar
|
|
|
|
%preun
|
|
%python_uninstall_alternative pylint
|
|
|
|
%check
|
|
export PYTHONPATH=$PWD
|
|
%python_exec %{_bindir}/py.test pylint/test/
|
|
|
|
%files %{python_files}
|
|
%defattr(-,root,root)
|
|
%doc ChangeLog COPYING README.rst
|
|
%doc examples/
|
|
%python_alternative %{_bindir}/pylint
|
|
%python_alternative %{_bindir}/epylint
|
|
%python_alternative %{_bindir}/pyreverse
|
|
%python_alternative %{_bindir}/symilar
|
|
%{python_sitelib}/pylint/
|
|
#%{python_sitelib}/pylint-%{version}-py*.egg-info
|
|
%{python_sitelib}/pylint-1.7.0-py*.egg-info
|
|
|
|
%changelog
|