commit 1af03ebf9b2903acf741def4c01af8871fe6c90198c7a904fc49d1aa0fb8fbaa Author: Adrian Schröter Date: Fri May 3 21:42:20 2024 +0200 Sync from SUSE:SLFO:Main python-odfpy revision 6c6f9deb07f131a36373fde6da0dd0ad diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/python-odfpy.changes b/python-odfpy.changes new file mode 100644 index 0000000..46f7133 --- /dev/null +++ b/python-odfpy.changes @@ -0,0 +1,122 @@ +------------------------------------------------------------------- +Wed Jan 4 18:32:36 UTC 2023 - Dirk Müller + +- update to 1.4.2: + * Add scale-to-X and scale-to-Y attributes to page-layout properties + * Add Support for Linux on power + * Update datatable.py + * Fix bug in __replaceGenerator() + +------------------------------------------------------------------- +Sun Oct 4 15:42:23 UTC 2020 - John Vandenberg + +- Change license from GPL-2.0-or-later AND Apache-2.0 to + GPL-2.0-or-later OR Apache-2.0 + +------------------------------------------------------------------- +Thu May 21 06:55:35 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Fri Mar 27 14:42:39 UTC 2020 - pgajdos@suse.com + +- version update to 1.4.1 + * no upstream changelog found + +------------------------------------------------------------------- +Fri Feb 22 01:45:28 UTC 2019 - John Vandenberg + +- Update to v1.4.0 + * Use defusedxml, which guards against various XML vulnerabilities + * Fix odf/opendocument.py toXml needs codecs import + * Add tests for various XML vulnerabilities + * Add metadata for Python 3.7 support +- Replace dead url with https://github.com/eea/odfpy + +------------------------------------------------------------------- +Wed Aug 29 10:52:40 UTC 2018 - tchvatal@suse.com + +- Make sure to install license files + +------------------------------------------------------------------- +Wed Jun 6 13:52:20 UTC 2018 - mcepl@suse.com + +- Clean SPEC file +- Switched on tests +- Update to 1.3.6 + * Proper import of load + * Escaping: replace xml-1.0-illegal characters with question marks + * ODT merge example + * Changed the path to save images. + Now image of the subobject is stored in a folder of subobject + +------------------------------------------------------------------- +Thu Aug 24 05:19:14 UTC 2017 - tbechtold@suse.com + +- update to 1.3.5 +- convert to singlespec + +------------------------------------------------------------------- +Fri Sep 13 14:58:14 UTC 2013 - os-dev@jacraig.com + +- Update to 0.9.6: + * This maintenance release adds the sources for the man-pages, and replaces + the thumbnail icon because the original has disappeared from + http://www.zwahlendesign.ch/en/node/20 along with the license statement. +- Changes from 0.9.5: + * Added missing license declarations. +- Changes from 0.9.4: + * This is a patch to fix an issue where chart styles were lost when saving a + ODT document. +- Change BuildRequires from distribute to setuptools. +- Spec file cleanup: + * Only add python_sitelib definition if needed and add braces when it is + used. + +------------------------------------------------------------------- +Mon Oct 8 16:38:17 UTC 2012 - cfarrell@suse.com + +- license update: GPL-2.0+ and Apache-2.0 + See setup.py + +------------------------------------------------------------------- +Wed Sep 21 13:47:47 UTC 2011 - saschpe@suse.de + +- Fix non-executable scripts +- Removed %clean section and CFLAGS, not needed + +------------------------------------------------------------------- +Thu Mar 31 14:25:41 UTC 2011 - saschpe@suse.de + +- Removed *.egg-info from %%files section + +------------------------------------------------------------------- +Thu Mar 3 08:56:50 UTC 2011 - saschpe@suse.de + +- Update to 0.9.3: + * No changelog +- Spec file cleanup: + * Removed empty lines, fixed indentation and license header + * No Perl build dependency + +------------------------------------------------------------------- +Fri Aug 27 07:33:21 UTC 2010 - toms@suse.de + +- Added .changes file + +------------------------------------------------------------------- +Wed Feb 17 00:00:00 UTC 2010 - cfarrell1980@gmail.com + +- Update to 0.9.2 + +------------------------------------------------------------------- +Tue Nov 03 00:00:00 UTC 2009 - cfarrell1980@gmail.com + +- Update to 0.9.1 + +------------------------------------------------------------------- +Tue Aug 12 00:00:00 UTC 2008 - cfarrell1980@gmail.com + +- Initial import and build. +- darix suggested to use perl to gather the man files. diff --git a/python-odfpy.spec b/python-odfpy.spec new file mode 100644 index 0000000..34b15b6 --- /dev/null +++ b/python-odfpy.spec @@ -0,0 +1,124 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# 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 https://bugs.opensuse.org/ +# + + +# +%define modname odfpy +%define binaries csv2ods mailodf odf2mht odf2xhtml odf2xml odfimgimport odflint odfmeta odfoutline odfuserfield xml2odf +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-%{modname} +Version: 1.4.2 +Release: 0 +Summary: Python API and tools to manipulate OpenDocument files +License: Apache-2.0 OR GPL-2.0-or-later +Group: Development/Languages/Python +URL: https://github.com/eea/odfpy +Source: https://github.com/eea/odfpy/archive/refs/tags/release-%{version}.tar.gz +BuildRequires: %{python_module defusedxml} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-defusedxml +Requires(post): update-alternatives +Requires(postun):update-alternatives +BuildArch: noarch +%python_subpackages + +%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 https://github.com/eea/odfpy for documentation and examples. + +%prep +%setup -q -n %{modname}-release-%{version} +sed -i "1d" odf/{userfield,odf2xhtml,manifest,element,elementtypes,load,odfmanifest,thumbnail}.py # Fix non-executable scripts + +%build +%python_build + +%install +%python_install +for b in %{binaries}; do + %python_clone -a %{buildroot}%{_mandir}/man1/$b.1 + %python_clone -a %{buildroot}%{_bindir}/$b +done +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%post +for b in %{binaries}; do + %python_install_alternative $b $b.1 +done + +%postun +for b in %{binaries}; do + %python_uninstall_alternative $b +done + +%files %{python_files} +%license APACHE-LICENSE-2.0.txt GPL-LICENSE-2.txt +%python_alternative %{_bindir}/csv2ods +%python_alternative %{_bindir}/mailodf +%python_alternative %{_bindir}/odf2mht +%python_alternative %{_bindir}/odf2xhtml +%python_alternative %{_bindir}/odf2xml +%python_alternative %{_bindir}/odfimgimport +%python_alternative %{_bindir}/odflint +%python_alternative %{_bindir}/odfmeta +%python_alternative %{_bindir}/odfoutline +%python_alternative %{_bindir}/odfuserfield +%python_alternative %{_bindir}/xml2odf +%python_alternative %{_mandir}/man1/csv2ods.1%{ext_man} +%python_alternative %{_mandir}/man1/mailodf.1%{ext_man} +%python_alternative %{_mandir}/man1/odf2mht.1%{ext_man} +%python_alternative %{_mandir}/man1/odf2xhtml.1%{ext_man} +%python_alternative %{_mandir}/man1/odf2xml.1%{ext_man} +%python_alternative %{_mandir}/man1/odfimgimport.1%{ext_man} +%python_alternative %{_mandir}/man1/odflint.1%{ext_man} +%python_alternative %{_mandir}/man1/odfmeta.1%{ext_man} +%python_alternative %{_mandir}/man1/odfoutline.1%{ext_man} +%python_alternative %{_mandir}/man1/odfuserfield.1%{ext_man} +%python_alternative %{_mandir}/man1/xml2odf.1%{ext_man} +%{python_sitelib}/odf +%{python_sitelib}/%{modname}* + +%changelog diff --git a/release-1.4.2.tar.gz b/release-1.4.2.tar.gz new file mode 100644 index 0000000..a95ae62 --- /dev/null +++ b/release-1.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24ad087f38031b2fe60bf22811b9550887afe1cfdea80672d6573387c3025583 +size 10065808