python-odfpy/python-odfpy.spec
Sascha Peilicke b4a3d55c41 - Update to 0.9.3:
* No changelog
- Spec file cleanup:
  * Removed empty lines, fixed indentation and license header
  * No Perl build dependency

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odfpy?expand=0&rev=2
2011-03-03 09:05:09 +00:00

90 lines
3.1 KiB
RPMSpec

#
# spec file for package python-odfpy
#
# Copyright (c) 2011 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/
#
# norootforbuild
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define mod_name odfpy
Name: python-%{mod_name}
Version: 0.9.3
Release: 0
Url: http://opendocumentfellowship.com/development/projects/odfpy
Summary: Python API and tools to manipulate OpenDocument files
License: GPLv2+, ASLv2
Group: Development/Languages/Python
Source: %{mod_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-setuptools
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
%description
Odfpy is a library to read and write OpenDocument v. 1.1 files.
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.
In addition to the API, there are a few scripts:
- csv2odf - Create OpenDocument spreadsheet from comma separated values
- mailodf - Email ODF file as HTML archive
- odf2xhtml - Convert ODF to (X)HTML
- odf2mht - Convert ODF to HTML archive
- odf2xml - Create OpenDocument XML file from OD? package
- odfimgimport - Import external images
- odflint - Check ODF file for problems
- odfmeta - List or change the metadata of an ODF file
- odfoutline - Show outline of OpenDocument
- odfuserfield - List or change the user-field declarations in an ODF file
- xml2odf - Create OD? package from OpenDocument in XML form
Visit http://odfpy.forge.osor.eu/ for documentation and examples.
%prep
%setup -q -n %{mod_name}-%{version}
%build
export CFLAGS="%{optflags}"
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man1/*
%python_sitelib/odf*
%python_sitelib/*.egg-info
%changelog