File python-pylint.spec of Package python-pylint

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



Name:           python-pylint
Version:        0.24.0
Release:        1
License:        GPLv2+
Summary:        Syntax and style checker for Python code
Url:            http://www.logilab.org/projects/pylint/
Group:          Development/Languages/Python
Source:         pylint-%{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
%{py_requires}
%if 0%suse_version > 1110
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 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.

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:
--------
    Logilab <python-projects@lists.logilab.org>

%prep
%setup -q -n pylint-%{version}

%build
%{__python} setup.py build

%install
#export PYTHONOPTIMIZE=1 #--optimize=1
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES

# some files contain expected errors, hence compilation fails, 
# remove them from installed file list, too
for p in $(find %{buildroot}%{py_sitedir}/pylint/test/input -name \*.py); do
    if ! $(test -f ${p}c); then
	f=$(basename $p)
	sed -i "/.*\/${f}c$/d" INSTALLED_FILES
    fi
done

%clean
%{__rm} -rf %{buildroot}

%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc README ChangeLog examples/ doc/

%changelog
openSUSE Build Service is sponsored by