odfpy-vl.spec 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  2. Name: odfpy
  3. Version: 0.9.2
  4. Release: 2%{?_dist_release}
  5. Summary: Python library for manipulating OpenDocument files
  6. Group: Development/Languages
  7. License: GPLv2+
  8. URL: http://forge.osor.eu/projects/odfpy/
  9. # This changes every time, most recent downloads are at http://forge.osor.eu/frs/?group_id=33
  10. Source0: http://forge.osor.eu/frs/download.php/805/odfpy-0.9.2.tar.gz
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  12. BuildArch: noarch
  13. BuildRequires: python-devel python-setuptools
  14. Provides: python-odf
  15. %description
  16. Odfpy aims to be a complete API for OpenDocument in Python. Unlike
  17. other more convenient APIs, this one is essentially an abstraction
  18. layer just above the XML format. The main focus has been to prevent
  19. the programmer from creating invalid documents. It has checks that
  20. raise an exception if the programmer adds an invalid element, adds an
  21. attribute unknown to the grammar, forgets to add a required attribute
  22. or adds text to an element that doesn't allow it.
  23. These checks and the API itself were generated from the RelaxNG
  24. schema, and then hand-edited. Therefore the API is complete and can
  25. handle all ODF constructions, but could be improved in its
  26. understanding of data types.
  27. #'
  28. %prep
  29. %setup -q
  30. %build
  31. CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build
  32. %install
  33. %__rm -rf %{buildroot}
  34. %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot}
  35. %__sed -i '/#!\/usr\/bin\/python/d' %{buildroot}%{python_sitelib}/odf/*.py
  36. %clean
  37. %__rm -rf %{buildroot}
  38. %files
  39. %defattr(-,root,root,-)
  40. %docdir examples
  41. %docdir contrib
  42. %{_bindir}/*
  43. %{_mandir}/man1/*
  44. %{python_sitelib}/*egg-info
  45. %{python_sitelib}/odf
  46. %changelog
  47. * Sun Mar 11 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.9.2-2
  48. - rebuild with python-2.7.2
  49. * Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> - 0.9.2-1
  50. - initial build based on Fedora development
  51. * Fri Jul 30 2010 Ian Weller <iweller@redhat.com> - 0.9.2-2
  52. - Fixed previous changelog entry
  53. * Fri Jul 30 2010 Ian Weller <iweller@redhat.com> - 0.9.2-1
  54. - Update to 0.9.2
  55. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.9-3
  56. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  57. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
  58. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  59. * Mon Apr 20 2009 Ian Weller <ianweller@gmail.com> - 0.9-1
  60. - Update upstream
  61. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-3
  62. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  63. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.8-2
  64. - Rebuild for Python 2.6
  65. * Fri Aug 22 2008 Ian Weller <ianweller@gmail.com> 0.8-1
  66. - Update upstream
  67. * Tue Jul 15 2008 Ian Weller <ianweller@gmail.com> 0.7-2
  68. - Change macros
  69. - Remove license file
  70. * Sun Jul 13 2008 Ian Weller <ianweller@gmail.com> 0.7-1
  71. - Add COPYING file
  72. - Use setuptools instead
  73. - sed out shebangs from module files
  74. - Other minor fixes
  75. * Sun Jul 13 2008 Paul W. Frields <stickster@gmail.com> - 0.7-0.1
  76. - Initial RPM package