%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: odfpy Version: 0.9.2 Release: 2%{?_dist_release} Summary: Python library for manipulating OpenDocument files Group: Development/Languages License: GPLv2+ URL: http://forge.osor.eu/projects/odfpy/ # This changes every time, most recent downloads are at http://forge.osor.eu/frs/?group_id=33 Source0: http://forge.osor.eu/frs/download.php/805/odfpy-0.9.2.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch BuildRequires: python-devel python-setuptools Provides: python-odf %description Odfpy aims to be a complete API for OpenDocument in Python. Unlike other more convenient APIs, this one is essentially an abstraction layer just above the XML format. The main focus has been to prevent the programmer from creating invalid documents. It has checks that raise an exception if the programmer adds an invalid element, adds an attribute unknown to the grammar, forgets to add a required attribute or adds text to an element that doesn't allow it. These checks and the API itself were generated from the RelaxNG schema, and then hand-edited. Therefore the API is complete and can handle all ODF constructions, but could be improved in its understanding of data types. #' %prep %setup -q %build CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build %install %__rm -rf %{buildroot} %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} %__sed -i '/#!\/usr\/bin\/python/d' %{buildroot}%{python_sitelib}/odf/*.py %clean %__rm -rf %{buildroot} %files %defattr(-,root,root,-) %docdir examples %docdir contrib %{_bindir}/* %{_mandir}/man1/* %{python_sitelib}/*egg-info %{python_sitelib}/odf %changelog * Sun Mar 11 2012 Yoji TOYODA - 0.9.2-2 - rebuild with python-2.7.2 * Mon Aug 23 2010 Munehiro Yamamoto - 0.9.2-1 - initial build based on Fedora development * Fri Jul 30 2010 Ian Weller - 0.9.2-2 - Fixed previous changelog entry * Fri Jul 30 2010 Ian Weller - 0.9.2-1 - Update to 0.9.2 * Wed Jul 21 2010 David Malcolm - 0.9-3 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Sat Jul 25 2009 Fedora Release Engineering - 0.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Apr 20 2009 Ian Weller - 0.9-1 - Update upstream * Thu Feb 26 2009 Fedora Release Engineering - 0.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.8-2 - Rebuild for Python 2.6 * Fri Aug 22 2008 Ian Weller 0.8-1 - Update upstream * Tue Jul 15 2008 Ian Weller 0.7-2 - Change macros - Remove license file * Sun Jul 13 2008 Ian Weller 0.7-1 - Add COPYING file - Use setuptools instead - sed out shebangs from module files - Other minor fixes * Sun Jul 13 2008 Paul W. Frields - 0.7-0.1 - Initial RPM package