File python-iniparse.spec of Package python-iniparse

#
# spec file for package python-iniparse (Version 0.4)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           python-iniparse
BuildRequires:  python-setuptools
Version:        0.4
Release:        1
Summary:        Python Module for Accessing and Modifying Configuration Data in INI files
Group:          Development/Libraries/Python
License:        MIT License (or similar)
Url:            http://code.google.com/p/iniparse/
Source0:        http://iniparse.googlecode.com/files/iniparse-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if %suse_version > 1120
BuildArch:      noarch
%endif
%py_requires

%description
iniparse is an INI parser for Python which is API compatible with the
standard library's ConfigParser, preserves structure of INI files
(order of sections & options, indentation, comments, and blank lines
are preserved when data is updated), and is more convenient to use.

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

%build
%{__python} setup.py build
# fixes
chmod 644 html/index.html

%install
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT --prefix=%{_prefix} --record-rpm=INSTALLED_FILES
# fixes
rm -rf $RPM_BUILD_ROOT/usr/share/doc/iniparse-%{version}
grep -v "share/doc/iniparse-%{version}" INSTALLED_FILES > INSTALLED_FILES-nodoc

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES-nodoc
%defattr(-,root,root,-)
%doc Changelog LICENSE LICENSE-PSF README html/index.html html/style.css

%changelog
openSUSE Build Service is sponsored by