%define name python-configobj %define srcname configobj %define version 5.0.5 %define release 1 %define is_python %(test -e /usr/bin/python && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %endif %define _libdir64 %{_prefix}/lib64 %define is_python_64 %(test -e /usr/bin/python_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python_64 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") %endif Summary: Config file reading, writing and validation. Name: %{name} Version: %{version} Release: %{release} Source0: https://pypi.python.org/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz Source1: %{srcname}-%{version}-tests.tar.gz License: UNKNOWN Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Michael Foord & Nicola Larosa Url: http://www.voidspace.org.uk/python/configobj.html BuildRequires: python, python-devel Requires: python %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 | Release 4.7.2 fixes several bugs in 4.7.1 | Release 4.7.1 fixes a bug with the deprecated options keyword in | 4.7.0. | Release 4.7.0 improves performance adds features for validation and | fixes some bugs. %prep %setup -q -n %{srcname}-%{version} mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build cd 64bit python_64 setup.py build cd ../32bit python setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT cd 64bit python_64 setup.py install --skip-build --root ${RPM_BUILD_ROOT} cd ../32bit python setup.py install --skip-build --root ${RPM_BUILD_ROOT} #%check # this needs to be set for tests.test_configobj.test_options_deprecation #export PYTHONWARNINGS=always #tar -xzf %{SOURCE1} #python test_configobj.py #py.test tests %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/PKG-INFO %{python_sitelib}/* %changelog * Thu May 12 2016 Ravi Hirekurabar - 5.0.5-1 - Update to version 5.0.5 * Thu Jul 16 2013 Tristan Delhalle - 1.1.3-1 - first version for AIX V6.1 and higher