File python-iniparse.spec of Package python-iniparse

# spec file for package python-iniparse
# Copyright (c) 2013 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

Name:           python-iniparse
Version:        0.4
Release:        0
Summary:        Python Module for Accessing and Modifying Configuration Data in INI files
License:        MIT
Group:          Development/Libraries/Python
# PATCH-FIX-UPSTREAM: -- Backport of
Patch0:         iniparse-insert-after-commented-option.patch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildArch:      noarch

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.

%setup -q -n iniparse-%{version}
%patch0 -p0
chmod 644 html/index.html
sed -i "/.*test_multiprocessing.*/d" tests/ # NOTE(saschpe): Doesn't work and I'm lazy

python build

python install --root %{buildroot} --prefix=%{_prefix}
rm -rf %{buildroot}%{_datadir}/doc/iniparse-%{version} # Remove unwanted stuff


%doc Changelog LICENSE LICENSE-PSF README html/*

openSUSE Build Service is sponsored by