15
0
forked from pool/python-svglib

- Update to 1.6.0

* Replace setup.py with pyproject.toml, rework GitHub workflows (#405).
  * Drop support for Python 3.8.
  * Modernize codebase, added type annotations, expanded docstrings, etc.
  * Add a Makefile.
  * Add publishing workflows.
  * Remove dunder constants and use importlib.metadata to get the version number.
- Install vg2pdf.1 as /usr/share/man//man1/svg2pdf.1
- Invoke chmod to fix permissions for src/svglib/__init__.py
- Remove sed command to remove shebang from svglib/svglib.py
- Remove touch command to create tests/__init__.py
- Update BuildRequires from pyproject.toml
- Use Python 3.11 on SLE-15 by default

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-svglib?expand=0&rev=6
This commit is contained in:
2025-12-10 08:47:04 +00:00
committed by Git OBS Bridge
commit e2f9fd0a48
6 changed files with 177 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

62
python-svglib.changes Normal file
View File

@@ -0,0 +1,62 @@
-------------------------------------------------------------------
Fri Nov 28 13:07:57 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 1.6.0
* Replace setup.py with pyproject.toml, rework GitHub workflows (#405).
* Drop support for Python 3.8.
* Modernize codebase, added type annotations, expanded docstrings, etc.
* Add a Makefile.
* Add publishing workflows.
* Remove dunder constants and use importlib.metadata to get the version number.
- Install vg2pdf.1 as /usr/share/man//man1/svg2pdf.1
- Invoke chmod to fix permissions for src/svglib/__init__.py
- Remove sed command to remove shebang from svglib/svglib.py
- Remove touch command to create tests/__init__.py
- Update BuildRequires from pyproject.toml
- Use Python 3.11 on SLE-15 by default
-------------------------------------------------------------------
Mon Sep 16 06:40:32 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- 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.
* <symbol> nodes now only appears in documents when they are referenced,
not on their initial appearance.
* If only rx or ry is defined on a <rect>, 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 <dmueller@suse.com>
- add missing runtime requires
-------------------------------------------------------------------
Fri Dec 24 06:15:20 UTC 2021 - John Vandenberg <jayvdb@gmail.com>
- Initial package for v1.1.0

85
python-svglib.spec Normal file
View File

@@ -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/
#
%{?sle15_python_module_pythons}
Name: python-svglib
Version: 1.6.0
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 hatchling}
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-rlpycairo >= 0.4.0
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}
chmod ugo-x src/svglib/__init__.py
%build
%pyproject_wheel
%install
%pyproject_install
install -Dm0644 svg2pdf.1 %{buildroot}%{_mandir}/man1/svg2pdf.1
%{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

3
svglib-1.5.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3ae765d3a9409ee60c0fb4d24c2deb6a80617aa927054f5bcd7fc98f0695e587
size 913900

3
svglib-1.6.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4c38a274a744ef0d1677f55d5d62fc0fb798819f813e52872a796e615741733d
size 1318276