forked from pool/python-odfpy
license update: GPL-2.0+ and Apache-2.0 See setup.py OBS-URL: https://build.opensuse.org/request/show/137513 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odfpy?expand=0&rev=5
82 lines
2.9 KiB
RPMSpec
82 lines
2.9 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/
|
|
#
|
|
|
|
|
|
Name: python-odfpy
|
|
Version: 0.9.3
|
|
Release: 0
|
|
Url: http://opendocumentfellowship.com/development/projects/odfpy
|
|
Summary: Python API and tools to manipulate OpenDocument files
|
|
License: GPL-2.0+ and Apache-2.0
|
|
Group: Development/Languages/Python
|
|
Source: odfpy-%{version}.tar.bz2
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-distribute
|
|
%if 0%{?suse_version}
|
|
%py_requires
|
|
%if 0%{?suse_version} > 1110
|
|
BuildArch: noarch
|
|
%endif
|
|
%endif
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%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 odfpy-%{version}
|
|
sed -i "1d" odf/{userfield,odf2xhtml,manifest,element,elementtypes,load,odfmanifest,thumbnail}.py # Fix non-executable scripts
|
|
|
|
%build
|
|
python setup.py build
|
|
|
|
%install
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_bindir}/*
|
|
%{_mandir}/man1/*
|
|
%python_sitelib/*
|
|
|
|
%changelog
|