From ad561002aa4a23c93e5be0300c2daec0bb952d5dfb5ce0db43e94b21d7d6fe09 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 --- python-svglib.changes | 35 +++++++++++++++++++++++++++++++++++ python-svglib.spec | 19 +++++++++++-------- svglib-1.1.0.tar.gz | 3 --- svglib-1.5.1.tar.gz | 3 +++ 4 files changed, 49 insertions(+), 11 deletions(-) delete mode 100644 svglib-1.1.0.tar.gz create mode 100644 svglib-1.5.1.tar.gz diff --git a/python-svglib.changes b/python-svglib.changes index 364e564..02b74d1 100644 --- a/python-svglib.changes +++ b/python-svglib.changes @@ -1,3 +1,38 @@ +------------------------------------------------------------------- +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 diff --git a/python-svglib.spec b/python-svglib.spec index 582d1a1..e42c24d 100644 --- a/python-svglib.spec +++ b/python-svglib.spec @@ -1,7 +1,7 @@ # # spec file for package python-svglib # -# Copyright (c) 2022 SUSE LLC +# 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 @@ -16,16 +16,16 @@ # -%{?!python_module:%define python_module() python3-%{**}} -%define skip_python2 1 Name: python-svglib -Version: 1.1.0 +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 @@ -41,7 +41,7 @@ Requires: python-lxml Requires: python-reportlab Requires: python-tinycss2 >= 0.6.0 Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -52,12 +52,14 @@ Pure Python library for reading and converting SVG. %setup -q -n svglib-%{version} # Remove hashbang sed -i '1{/^#!/d}' svglib/svglib.py +# Make tests a module +touch tests/__init__.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %{python_clone -a %{buildroot}%{_bindir}/svg2pdf} %{python_clone -a %{buildroot}%{_mandir}/man1/svg2pdf.1} %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -77,6 +79,7 @@ sed -i '1{/^#!/d}' svglib/svglib.py %license LICENSE.txt %python_alternative %{_bindir}/svg2pdf %python_alternative %{_mandir}/man1/svg2pdf.1%{ext_man} -%{python_sitelib}/svglib*/ +%{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 deleted file mode 100644 index a460c01..0000000 --- a/svglib-1.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -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