%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: odfpy Version: 0.7 Release: 3%{?dist} Summary: Python library for manipulating OpenDocument files Group: Development/Languages License: GPLv2+ URL: http://opendocumentfellowship.com/projects/%{name} Source0: http://opendocumentfellowship.com/files/%{name}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel python-setuptools-devel %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")' bdist_egg %install rm -rf %{buildroot} mkdir -p %{buildroot}%{python_sitelib} touch %{buildroot}%{python_sitelib}/easy-install.pth easy_install -m --prefix $RPM_BUILD_ROOT%{_usr} dist/*.egg rm -f %{buildroot}%{python_sitelib}/easy-install.pth sed -i '/#!\/usr\/bin\/python/d' %{buildroot}%{python_sitelib}/odfpy*egg/odf/*.py %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %docdir examples %docdir contrib %{_bindir}/* # ? No man page in 0.7? #%{_mandir}/man1/* %{python_sitelib}/*egg %changelog * 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