From dff83e6bef032faa607db71207682d5eab7036b908b678ef1985d32005336b39 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 16 Sep 2024 06:40:57 +0000 Subject: [PATCH] =?UTF-8?q?-=20Update=20to=201.5.1:=20=20=20*=20Final=20fi?= =?UTF-8?q?x=20to=20conversion=20from=20shorthand=20quadratic=20to=20cubic?= =?UTF-8?q?=20b=C3=A9zier.=20=20=20*=20Add=20support=20for=20ex=20units=20?= =?UTF-8?q?(assuming=20for=20em/2).=20=20=20*=20Add=20support=20for=20imag?= =?UTF-8?q?e/jpg=20embedded=20images=20(in=20addition=20to=20image/jpeg).?= =?UTF-8?q?=20=20=20*=20Avoid=20crash=20on=20@import=20rules=20in=20styles?= =?UTF-8?q?heets.=20The=20rules=20are=20simply=20=20=20=20=20ignored.=20?= =?UTF-8?q?=20=20*=20Fix=20conversion=20from=20shorthand=20quadratic=20to?= =?UTF-8?q?=20cubic=20b=C3=A9zier.=20=20=20*=20Include=20tests/samples/oth?= =?UTF-8?q?ers/*.svg=20in=20source=20distribution.=20=20=20*=20Render=20le?= =?UTF-8?q?ading=20and=20trailing=20text=20content=20in=20text=20nodes.=20?= =?UTF-8?q?=20=20*=20Better=20integration=20with=20cssselect2=20to=20suppo?= =?UTF-8?q?rt=20a=20wider=20range=20of=20CSS=20=20=20=20=20selectors.=20?= =?UTF-8?q?=20=20*=20Support=20mmult=20import=20from=20reportlab=20<=203.5?= =?UTF-8?q?.61.=20=20=20*=20Make=20zero-length=20Line,=20PolyLine=20and=20?= =?UTF-8?q?Polygon=20appear=20in=20PDFs=20when=20their=20=20=20=20=20strok?= =?UTF-8?q?e=20value=20is=20non-zero.=20=20=20*=20=20nodes=20now?= =?UTF-8?q?=20only=20appears=20in=20documents=20when=20they=20are=20refere?= =?UTF-8?q?nced,=20=20=20=20=20not=20on=20their=20initial=20appearance.=20?= =?UTF-8?q?=20=20*=20If=20only=20rx=20or=20ry=20is=20defined=20on=20a=20,=20the=20value=20is=20used=20for=20both.=20=20=20*=20Suppo?= =?UTF-8?q?rt=20non-prefixed=20href=20attribute=20added=20in=20SVG=202.=20?= =?UTF-8?q?=20=20*=20Fixed=20parsing=20of=20empty=20SVG=20style=20nodes.?= =?UTF-8?q?=20=20=20*=20Handle=20content=20of=20multiple=20SVG=20style=20n?= =?UTF-8?q?odes.=20=20=20*=20Better=20font=20caching=20for=20some=20font?= =?UTF-8?q?=20names.=20=20=20*=20Revert=20to=20scripts=20usage=20instead?= =?UTF-8?q?=20of=20console=5Fscripts=20during=20setup.=20=20=20*=20dropped?= =?UTF-8?q?=20support=20for=20Python=203.6=20and=20added=20official=20supp?= =?UTF-8?q?ort=20for=20Python=20=20=20=20=203.10.=20=20=20*=20improved=20s?= =?UTF-8?q?upport=20for=20scientific=20notation=20in=20paths=20=20=20*=20i?= =?UTF-8?q?f=20some=20path=20has=20a=20color=20with=20alpha=20value,=20it?= =?UTF-8?q?=20also=20sets=20the=20default=20fill=20=20=20=20=20or=20stroke?= =?UTF-8?q?=20opacity=20of=20the=20resulting=20object.=20=20=20*=20matrix?= =?UTF-8?q?=20transforms=20on=20groups=20are=20combined=20with=20other=20t?= =?UTF-8?q?ransforms=20instead=20=20=20=20=20of=20replacing=20them.=20-=20?= =?UTF-8?q?Switch=20to=20pyproject=20macros.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-svglib?expand=0&rev=4 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + python-svglib.changes | 45 +++++++++++++++++++++++ python-svglib.spec | 85 +++++++++++++++++++++++++++++++++++++++++++ svglib-1.1.0.tar.gz | 3 ++ svglib-1.5.1.tar.gz | 3 ++ 6 files changed, 160 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-svglib.changes create mode 100644 python-svglib.spec create mode 100644 svglib-1.1.0.tar.gz create mode 100644 svglib-1.5.1.tar.gz 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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-svglib.changes b/python-svglib.changes new file mode 100644 index 0000000..02b74d1 --- /dev/null +++ b/python-svglib.changes @@ -0,0 +1,45 @@ +------------------------------------------------------------------- +Mon Sep 16 06:40:32 UTC 2024 - Steve Kowalik + +- Update to 1.5.1: + * Final fix to conversion from shorthand quadratic to cubic bézier. + * Add support for ex units (assuming for em/2). + * Add support for image/jpg embedded images (in addition to image/jpeg). + * Avoid crash on @import rules in stylesheets. The rules are simply + ignored. + * Fix conversion from shorthand quadratic to cubic bézier. + * Include tests/samples/others/*.svg in source distribution. + * Render leading and trailing text content in text nodes. + * Better integration with cssselect2 to support a wider range of CSS + selectors. + * Support mmult import from reportlab < 3.5.61. + * Make zero-length Line, PolyLine and Polygon appear in PDFs when their + stroke value is non-zero. + * nodes now only appears in documents when they are referenced, + not on their initial appearance. + * If only rx or ry is defined on a , the value is used for both. + * Support non-prefixed href attribute added in SVG 2. + * Fixed parsing of empty SVG style nodes. + * Handle content of multiple SVG style nodes. + * Better font caching for some font names. + * Revert to scripts usage instead of console_scripts during setup. + * dropped support for Python 3.6 and added official support for Python + 3.10. + * improved support for scientific notation in paths + * if some path has a color with alpha value, it also sets the default fill + or stroke opacity of the resulting object. + * matrix transforms on groups are combined with other transforms instead + of replacing them. +- Switch to pyproject macros. +- No more globs in %files. + +------------------------------------------------------------------- +Tue Feb 22 17:25:10 UTC 2022 - Dirk Müller + +- add missing runtime requires + +------------------------------------------------------------------- +Fri Dec 24 06:15:20 UTC 2021 - John Vandenberg + +- Initial package for v1.1.0 + diff --git a/python-svglib.spec b/python-svglib.spec new file mode 100644 index 0000000..e42c24d --- /dev/null +++ b/python-svglib.spec @@ -0,0 +1,85 @@ +# +# spec file for package python-svglib +# +# Copyright (c) 2024 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/ +# + + +Name: python-svglib +Version: 1.5.1 +Release: 0 +Summary: Python library for reading and converting SVG +License: LGPL-3.0-only +URL: https://github.com/deeplook/svglib +Source: https://files.pythonhosted.org/packages/source/s/svglib/svglib-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module cssselect2 >= 0.2.0} +BuildRequires: %{python_module lxml} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module reportlab} +BuildRequires: %{python_module tinycss2 >= 0.6.0} +BuildRequires: yudit +# /SECTION +Requires: python-cssselect2 >= 0.2.0 +Requires: python-lxml +Requires: python-reportlab +Requires: python-tinycss2 >= 0.6.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives +BuildArch: noarch +%python_subpackages + +%description +Pure Python library for reading and converting SVG. + +%prep +%setup -q -n svglib-%{version} +# Remove hashbang +sed -i '1{/^#!/d}' svglib/svglib.py +# Make tests a module +touch tests/__init__.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%{python_clone -a %{buildroot}%{_bindir}/svg2pdf} +%{python_clone -a %{buildroot}%{_mandir}/man1/svg2pdf.1} +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# Skip several tests needing files from internet +%pytest -rs -k 'not (TestWikipediaFlags or TestOtherFiles or (TestW3CSVG and test_convert_pdf_png))' + +%post +%{python_install_alternative svg2pdf svg2pdf.1%{ext_man}} + +%postun +%python_uninstall_alternative svg2pdf + +%files %{python_files} +%doc CHANGELOG.rst README.rst +%license LICENSE.txt +%python_alternative %{_bindir}/svg2pdf +%python_alternative %{_mandir}/man1/svg2pdf.1%{ext_man} +%{python_sitelib}/svglib +%{python_sitelib}/svglib-%{version}.dist-info + +%changelog diff --git a/svglib-1.1.0.tar.gz b/svglib-1.1.0.tar.gz new file mode 100644 index 0000000..a460c01 --- /dev/null +++ b/svglib-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:520ee5290ee2ebeebd20ca0d7d995c08c903b364fcf515826bab43a1288d422e +size 2041441 diff --git a/svglib-1.5.1.tar.gz b/svglib-1.5.1.tar.gz new file mode 100644 index 0000000..9597faa --- /dev/null +++ b/svglib-1.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ae765d3a9409ee60c0fb4d24c2deb6a80617aa927054f5bcd7fc98f0695e587 +size 913900