LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-pylint.spec of Package python3-pylint (Project devel:languages:python3)

# spec file for package python-pylint
# Copyright (c) 2012 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
# 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/

%define modname pylint
Name:           python-%{modname}
Version:        0.25.1
Release:        0
Summary:        Syntax and style checker for Python code
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-devel
Requires:       python-logilab-astng >= 0.21.1
Requires:       python-logilab-common >= 0.55
Provides:       pylint = %{version}
Obsoletes:      pylint < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildArch:      noarch

Pylint analyzes Python source code looking for bugs and signs of poor

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

%setup -q -n %{modname}-%{version}

python setup.py build

#export PYTHONOPTIMIZE=1 #--optimize=1
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# fix non-executable rpmlint warning
chmod +x %{buildroot}%{python_sitelib}/%{modname}/epylint.py

rm -rf %{buildroot}

%doc README ChangeLog examples/ doc/