File python-configobj.spec of Package python-configobj

#
# spec file for package python-configobj
#
# 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 configobj
Name:           python-%{modname}
Version:        5.0.2
Release:        1.1
# FIXME: Change python-cofigobj-docs Obsoletes to < with next version update. Obsoletes introduced with version 4.7.2.
Url:            http://www.voidspace.org.uk/python/configobj.html
Summary:        Config file reading, writing and validation
License:        BSD-3-Clause
Group:          Development/Languages/Python
Source:         http://pypi.python.org/packages/source/c/%{modname}/%{modname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel >= 2.7
# There are no real docs!
Provides:       python-%{modname}-docs = %{version}
Obsoletes:      python-%{modname}-docs <= %{version}
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
BuildArch:      noarch
%py_requires
%endif

%description
ConfigObj is a simple but powerful config file reader and writer: an ini
file round tripper. Its main feature is that it is very easy to use, with a
straightforward programmer's interface and a simple syntax for config files.
It has lots of other features though:

 * Nested sections (subsections), to any level
 * List values
 * Multiple line values
 * Full Unicode support
 * String interpolation (substitution)
 * Integrated with a powerful validation system
   - including automatic type checking/conversion
   - and allowing default values
   - repeated sections
 * All comments in the file are preserved
 * The order of keys/sections is preserved
 * Powerful ``unrepr`` mode for storing/retrieving Python data-types

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

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%files
%defattr(-,root,root,-)
%{python_sitelib}/%{modname}.py*
%{python_sitelib}/validate.py*
%{python_sitelib}/%{modname}-%{version}-py%{py_ver}.egg-info

%changelog
* Tue May 29 2012 cfarrell@suse.com
- license update: BSD-3-Clause
  Refers only to the license available at
  http://www.voidspace.org.uk/python/license.shtml (which is BSD-3-Clause)
* Fri May 25 2012 toddrme2178@gmail.com
- Spec file cleanups
* Sun Feb  5 2012 dimstar@opensuse.org
- Really make the obsoletes sane: The package was called
  python-configobj-docs before, so that's what we need to obsolete
  (not -doc).
- The Obsoletes tag is for <= %%{version}, as the package existed in
  version 4.7.2, which is also when it was merged back. Obsoleting
  only < 4.7.2 would cause conflicts when installing the newly
  merged package.
* Tue Jan 24 2012 bwiedemann@suse.com
- fix Obsoletes
* Fri Dec  9 2011 saschpe@suse.de
- Spec file cleanup:
  * Use upstream tarball
  * Obsoleted empty doc package
  * Fix SLE-11 build
  * Use upstream description
* Thu Dec  8 2011 coolo@suse.com
- fix license to be in spdx.org format
* Mon Sep 13 2010 dimstar@opensuse.org
- Update to version 4.7.2:
  + BUGFIX: Restore Python 2.3 compatibility
  + BUGFIX: Members that were lists were being returned as copies
    due to interpolation introduced in 4.7. Lists are now only
    copies if interpolation changes a list member.
  + BUGFIX: pop now does interpolation in list values as well.
  + BUGFIX: where interpolation matches a section name rather
    than a value it is ignored instead of raising an exception on
    fetching the item.
  + BUGFIX: values that use interpolation to reference members
    that don't exist can now be repr'd.
  + BUGFIX: Fix to avoid writing '\r\r\n' on Windows when given a
    file opened in text write mode ('w').
* Tue Jul 20 2010 pascal.bleser@opensuse.org
- update to 4.7.1
- split out -docs subpackage
* Sun May 27 2007 peter+rpmspam@suntel.com.tr
- add "unzip" as a builddep so it builds on Factory - 4.4.0
* Fri May 11 2007 poeml@suse.de
- package created (copy from packman package) - 4.4.0
openSUSE Build Service is sponsored by