Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package
python-sphinxcontrib-svg2pdfconverter for openSUSE:Factory checked in at
2026-03-30 18:31:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sphinxcontrib-svg2pdfconverter (Old)
and
/work/SRC/openSUSE:Factory/.python-sphinxcontrib-svg2pdfconverter.new.1999 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sphinxcontrib-svg2pdfconverter"
Mon Mar 30 18:31:07 2026 rev:9 rq:1343509 version:2.1.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-sphinxcontrib-svg2pdfconverter/python-sphinxcontrib-svg2pdfconverter.changes
2024-11-11 13:45:34.644445285 +0100
+++
/work/SRC/openSUSE:Factory/.python-sphinxcontrib-svg2pdfconverter.new.1999/python-sphinxcontrib-svg2pdfconverter.changes
2026-03-30 18:34:10.602276013 +0200
@@ -1,0 +2,8 @@
+Sun Mar 29 18:42:48 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 2.1.0:
+ * support for sphinx 8.2
+ * port to pyproject.toml
+ * migrate to PEP-0420
+
+-------------------------------------------------------------------
Old:
----
sphinxcontrib_svg2pdfconverter-1.2.3.tar.gz
New:
----
sphinxcontrib_svg2pdfconverter-2.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sphinxcontrib-svg2pdfconverter.spec ++++++
--- /var/tmp/diff_new_pack.0temyz/_old 2026-03-30 18:34:11.190300597 +0200
+++ /var/tmp/diff_new_pack.0temyz/_new 2026-03-30 18:34:11.194300764 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-sphinxcontrib-svg2pdfconverter
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-sphinxcontrib-svg2pdfconverter
-Version: 1.2.3
+Version: 2.1.0
Release: 0
Summary: Sphinx SVG to PDF converter extension
License: BSD-2-Clause
@@ -53,6 +53,5 @@
%doc README.rst
%license LICENSE.txt
%{python_sitelib}/sphinxcontrib
-%{python_sitelib}/sphinxcontrib*.pth
%{python_sitelib}/sphinxcontrib_svg2pdfconverter-%{version}.dist-info
++++++ sphinxcontrib_svg2pdfconverter-1.2.3.tar.gz ->
sphinxcontrib_svg2pdfconverter-2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib_svg2pdfconverter-1.2.3/MANIFEST.in
new/sphinxcontrib_svg2pdfconverter-2.1.0/MANIFEST.in
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/MANIFEST.in 2022-10-08
10:37:16.000000000 +0200
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/MANIFEST.in 1970-01-01
01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-include README.rst
-include LICENSE.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib_svg2pdfconverter-1.2.3/PKG-INFO
new/sphinxcontrib_svg2pdfconverter-2.1.0/PKG-INFO
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/PKG-INFO 2024-09-12
18:24:58.646209500 +0200
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/PKG-INFO 2026-03-05
19:22:26.283309000 +0100
@@ -1,35 +1,33 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: sphinxcontrib-svg2pdfconverter
-Version: 1.2.3
-Summary: Sphinx SVG to PDF converter extension
-Home-page:
https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter
-Download-URL: https://pypi.org/project/sphinxcontrib-svg2pdfconverter
-Author: Stefan Wiehler
-Author-email: [email protected]
-License: BSD
-Platform: any
+Version: 2.1.0
+Summary: Sphinx SVG to PDF or PNG converter extension
+Author-email: Stefan Wiehler <[email protected]>
+License-Expression: BSD-2-Clause
+Project-URL: Homepage,
https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter
+Project-URL: Download, https://pypi.org/project/sphinxcontrib-svg2pdfconverter
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
+Classifier: Framework :: Sphinx :: Extension
Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
-Classifier: Framework :: Sphinx :: Extension
Classifier: Topic :: Documentation
Classifier: Topic :: Utilities
-Requires-Python: ~=3.4
+Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: Sphinx>=1.6.3
Provides-Extra: cairosvg
Requires-Dist: cairosvg>=1.0; extra == "cairosvg"
+Dynamic: license-file
-*************************************
-Sphinx SVG to PDF Converter Extension
-*************************************
+********************************************
+Sphinx SVG to PDF or PNG Converter Extension
+********************************************
-This extension converts SVG images to PDF in case the builder does not support
+This extension converts SVG images to PDF or PNG in case the builder does not
support
SVG images natively (e.g. LaTeX).
Internally, either `Inkscape <https://inkscape.org/>`_, ``rsvg-convert``
@@ -86,9 +84,10 @@
Path to RSVG converter binary. By default, this is ``rsvg-convert``.
``rsvg_converter_format``
- The value provided to the RSVG converter's ``--format`` argument. In more
- recent RSVG builds, the ``pdf1.5`` format will generate the fewest warnings
- with LaTeX backends. By default, this is ``pdf``.
+ The value provided to the RSVG converter's ``--format`` argument when
+ converting to PDF. In more recent RSVG builds, the ``pdf1.5`` format will
+ generate the fewest warnings with LaTeX backends.
+ By default, this is ``pdf``.
``rsvg_converter_args``
Additional command-line arguments for the RSVG converter, as a list. By
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib_svg2pdfconverter-1.2.3/README.rst
new/sphinxcontrib_svg2pdfconverter-2.1.0/README.rst
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/README.rst 2024-09-12
17:49:43.000000000 +0200
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/README.rst 2025-12-01
19:46:24.000000000 +0100
@@ -1,8 +1,8 @@
-*************************************
-Sphinx SVG to PDF Converter Extension
-*************************************
+********************************************
+Sphinx SVG to PDF or PNG Converter Extension
+********************************************
-This extension converts SVG images to PDF in case the builder does not support
+This extension converts SVG images to PDF or PNG in case the builder does not
support
SVG images natively (e.g. LaTeX).
Internally, either `Inkscape <https://inkscape.org/>`_, ``rsvg-convert``
@@ -59,9 +59,10 @@
Path to RSVG converter binary. By default, this is ``rsvg-convert``.
``rsvg_converter_format``
- The value provided to the RSVG converter's ``--format`` argument. In more
- recent RSVG builds, the ``pdf1.5`` format will generate the fewest warnings
- with LaTeX backends. By default, this is ``pdf``.
+ The value provided to the RSVG converter's ``--format`` argument when
+ converting to PDF. In more recent RSVG builds, the ``pdf1.5`` format will
+ generate the fewest warnings with LaTeX backends.
+ By default, this is ``pdf``.
``rsvg_converter_args``
Additional command-line arguments for the RSVG converter, as a list. By
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib_svg2pdfconverter-1.2.3/pyproject.toml
new/sphinxcontrib_svg2pdfconverter-2.1.0/pyproject.toml
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/pyproject.toml 1970-01-01
01:00:00.000000000 +0100
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/pyproject.toml 2026-03-05
19:16:27.000000000 +0100
@@ -0,0 +1,37 @@
+[build-system]
+requires = ["setuptools >=61.0.0", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "sphinxcontrib-svg2pdfconverter"
+version = "2.1.0"
+description = "Sphinx SVG to PDF or PNG converter extension"
+readme = "README.rst"
+license = "BSD-2-Clause"
+authors = [
+ {name = "Stefan Wiehler", email =
"[email protected]"},
+]
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Environment :: Console",
+ "Environment :: Web Environment",
+ "Framework :: Sphinx :: Extension",
+ "Intended Audience :: Developers",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 3",
+ "Topic :: Documentation",
+ "Topic :: Utilities",
+]
+requires-python = ">=3.6"
+dependencies = [
+ "Sphinx>=1.6.3",
+]
+
+[project.urls]
+Homepage =
"https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter"
+Download = "https://pypi.org/project/sphinxcontrib-svg2pdfconverter"
+
+[project.optional-dependencies]
+CairoSVG = [
+ "cairosvg>=1.0",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib_svg2pdfconverter-1.2.3/setup.cfg
new/sphinxcontrib_svg2pdfconverter-2.1.0/setup.cfg
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/setup.cfg 2024-09-12
18:24:58.647209600 +0200
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/setup.cfg 2026-03-05
19:22:26.283309000 +0100
@@ -1,6 +1,3 @@
-[metadata]
-license_file = LICENSE.txt
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib_svg2pdfconverter-1.2.3/setup.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/setup.py
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/setup.py 2024-09-12
18:24:42.000000000 +0200
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/setup.py 2025-03-07
19:33:45.000000000 +0100
@@ -1,47 +1 @@
-# -*- coding: utf-8 -*-
-
-from setuptools import setup, find_packages
-from os import path
-
-here = path.abspath(path.dirname(__file__))
-
-# Get the long description from the README file
-with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
- long_description = f.read()
-
-requires = ['Sphinx>=1.6.3']
-
-setup(
- name='sphinxcontrib-svg2pdfconverter',
- version='1.2.3',
-
url='https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter',
- download_url='https://pypi.org/project/sphinxcontrib-svg2pdfconverter',
- license='BSD',
- author='Stefan Wiehler',
- author_email='[email protected]',
- description='Sphinx SVG to PDF converter extension',
- long_description=long_description,
- long_description_content_type='text/x-rst',
- zip_safe=False,
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Console',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: BSD License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python :: 3',
- 'Framework :: Sphinx :: Extension',
- 'Topic :: Documentation',
- 'Topic :: Utilities',
- ],
- platforms='any',
- packages=find_packages(),
- include_package_data=True,
- install_requires=requires,
- extras_require={
- "CairoSVG": ['cairosvg>=1.0'],
- },
- python_requires='~=3.4',
- namespace_packages=['sphinxcontrib'],
-)
+__import__('setuptools').setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/__init__.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/__init__.py
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/__init__.py
2024-09-12 18:24:42.000000000 +0200
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/__init__.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- sphinxcontrib
- ~~~~~~~~~~~~~
-
- This package is a namespace package that contains all extensions
- distributed in the ``sphinx-contrib`` distribution.
-
- :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE.txt for details.
-"""
-
-__import__('pkg_resources').declare_namespace(__name__)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/cairosvgconverter/__init__.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/cairosvgconverter/__init__.py
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/cairosvgconverter/__init__.py
1970-01-01 01:00:00.000000000 +0100
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/cairosvgconverter/__init__.py
2026-03-05 19:15:23.000000000 +0100
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinxcontrib.cairosvgconverter
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Converts SVG images to PDF or PNG using CairoSVG in case the builder does
not
+ support SVG images natively (e.g. LaTeX).
+
+ See <https://cairosvg.org/>.
+
+ :copyright: Copyright 2018-2023 by Stefan Wiehler
+ <[email protected]> and
+ Copyright 2020 by Marko Kohtala
+ <[email protected]>.
+ :license: BSD, see LICENSE.txt for details.
+"""
+from .cairosvgconverter import CairoSVGConverter
+
+
+def setup(app):
+ # type: (Sphinx) -> Dict[unicode, Any]
+ app.add_post_transform(CairoSVGConverter)
+
+ return {
+ 'version': 'builtin',
+ 'parallel_read_safe': True,
+ 'parallel_write_safe': True,
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/cairosvgconverter/cairosvgconverter.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/cairosvgconverter/cairosvgconverter.py
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/cairosvgconverter/cairosvgconverter.py
1970-01-01 01:00:00.000000000 +0100
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/cairosvgconverter/cairosvgconverter.py
2026-03-05 19:15:23.000000000 +0100
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+# SPDX-License-Indentifier: BSD-2-Clause
+# Copyright (C) 2018-2023 Stefan Wiehler
<[email protected]>
+# Copyright (C) 2020 by Marko Kohtala <[email protected]>
+from sphinx.errors import ExtensionError
+from sphinx.locale import __
+from sphinx.transforms.post_transforms.images import ImageConverter
+from sphinx.util import logging
+from urllib.error import URLError
+
+if False:
+ # For type annotation
+ from typing import Any, Dict # NOQA
+ from sphinx.application import Sphinx # NOQA
+
+
+logger = logging.getLogger(__name__)
+
+
+class CairoSVGConverter(ImageConverter):
+ conversion_rules = [
+ ('image/svg+xml', 'application/pdf'),
+ ('image/svg+xml', 'image/png'),
+ ]
+
+ def is_available(self):
+ # type: () -> bool
+ """Confirms if CairoSVG package is available or not."""
+ try:
+ import cairosvg # noqa: F401
+ return True
+ except ImportError:
+ logger.warning(__('CairoSVG package cannot be imported. '
+ 'Check if CairoSVG has been installed properly'))
+ return False
+
+ def convert(self, _from, _to):
+ # type: (unicode, unicode) -> bool
+ """Converts the image from SVG to PDF or PNG via CairoSVG."""
+ import cairosvg
+ import pathlib
+ try:
+ # Guess output format based on file extension
+ fmt = pathlib.Path(str(_to)).suffix[1:]
+ if fmt == 'png':
+ cairosvg.svg2png(file_obj=open(_from, 'rb'), write_to=_to)
+ else:
+ cairosvg.svg2pdf(file_obj=open(_from, 'rb'), write_to=_to)
+ except (OSError, URLError) as err:
+ raise ExtensionError(__('CairoSVG converter failed with reason: '
+ '%s') % err.reason)
+
+ return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/cairosvgconverter.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/cairosvgconverter.py
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/cairosvgconverter.py
2023-01-13 19:14:35.000000000 +0100
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/cairosvgconverter.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,70 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- sphinxcontrib.cairosvgconverter
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Converts SVG images to PDF using CairoSVG in case the builder does not
- support SVG images natively (e.g. LaTeX).
-
- See <https://cairosvg.org/>.
-
- :copyright: Copyright 2018-2023 by Stefan Wiehler
- <[email protected]> and
- Copyright 2020 by Marko Kohtala
- <[email protected]>.
- :license: BSD, see LICENSE.txt for details.
-"""
-
-from sphinx.errors import ExtensionError
-from sphinx.locale import __
-from sphinx.transforms.post_transforms.images import ImageConverter
-from sphinx.util import logging
-from urllib.error import URLError
-
-if False:
- # For type annotation
- from typing import Any, Dict # NOQA
- from sphinx.application import Sphinx # NOQA
-
-
-logger = logging.getLogger(__name__)
-
-
-class CairoSVGConverter(ImageConverter):
- conversion_rules = [
- ('image/svg+xml', 'application/pdf'),
- ]
-
- def is_available(self):
- # type: () -> bool
- """Confirms if CairoSVG package is available or not."""
- try:
- import cairosvg # noqa: F401
- return True
- except ImportError:
- logger.warning(__('CairoSVG package cannot be imported. '
- 'Check if CairoSVG has been installed properly'))
- return False
-
- def convert(self, _from, _to):
- # type: (unicode, unicode) -> bool
- """Converts the image from SVG to PDF via CairoSVG."""
- import cairosvg
- try:
- cairosvg.svg2pdf(file_obj=open(_from, 'rb'), write_to=_to)
- except (OSError, URLError) as err:
- raise ExtensionError(__('CairoSVG converter failed with reason: '
- '%s') % err.reason)
-
- return True
-
-
-def setup(app):
- # type: (Sphinx) -> Dict[unicode, Any]
- app.add_post_transform(CairoSVGConverter)
-
- return {
- 'version': 'builtin',
- 'parallel_read_safe': True,
- 'parallel_write_safe': True,
- }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/inkscapeconverter/__init__.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/inkscapeconverter/__init__.py
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/inkscapeconverter/__init__.py
1970-01-01 01:00:00.000000000 +0100
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/inkscapeconverter/__init__.py
2026-03-05 19:15:23.000000000 +0100
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinxcontrib.inkscapeconverter
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Converts SVG images to PDF or PNG using Inkscape in case the builder does
not
+ support SVG images natively (e.g. LaTeX).
+
+ :copyright: Copyright 2018-2023 by Stefan Wiehler
+ <[email protected]>.
+ :license: BSD, see LICENSE.txt for details.
+"""
+from .inkscapeconverter import InkscapeConverter
+
+
+def setup(app):
+ # type: (Sphinx) -> Dict[unicode, Any]
+ app.add_post_transform(InkscapeConverter)
+ app.add_config_value('inkscape_converter_bin', 'inkscape', 'env')
+ app.add_config_value('inkscape_converter_args',
+ ['--export-area-drawing'], 'env')
+
+ return {
+ 'version': 'builtin',
+ 'parallel_read_safe': True,
+ 'parallel_write_safe': True,
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/inkscapeconverter/inkscapeconverter.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/inkscapeconverter/inkscapeconverter.py
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/inkscapeconverter/inkscapeconverter.py
1970-01-01 01:00:00.000000000 +0100
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/inkscapeconverter/inkscapeconverter.py
2026-03-05 19:15:23.000000000 +0100
@@ -0,0 +1,93 @@
+# -*- coding: utf-8 -*-
+# SPDX-License-Indentifier: BSD-2-Clause
+# Copyright (C) 2018-2023 Stefan Wiehler
<[email protected]>
+import re
+import subprocess
+
+from sphinx.errors import ExtensionError
+from sphinx.locale import __
+from sphinx.transforms.post_transforms.images import ImageConverter
+from sphinx.util import logging
+from errno import ENOENT, EPIPE, EINVAL
+
+if False:
+ # For type annotation
+ from typing import Any, Dict # NOQA
+ from sphinx.application import Sphinx # NOQA
+
+
+logger = logging.getLogger(__name__)
+
+
+class InkscapeConverter(ImageConverter):
+ conversion_rules = [
+ ('image/svg+xml', 'application/pdf'),
+ ('image/svg+xml', 'image/png'),
+ ]
+
+ inkscape_version: str = ""
+
+ def is_available(self):
+ # type: () -> bool
+ """Confirms if Inkscape is available or not."""
+ try:
+ args = [self.config.inkscape_converter_bin, '--version']
+ logger.debug('Invoking %r ...', args)
+ output = subprocess.check_output(
+ args, stdin=subprocess.PIPE, stderr=subprocess.PIPE,
+ universal_newlines=True)
+ match = re.search('Inkscape (.+)', output)
+ if not match:
+ logger.warning(__('Inkscape command %r returned invalid
result: %s\n '
+ 'Check the inkscape_converter_bin setting'),
+ self.config.inkscape_converter_bin, output)
+ return False
+ InkscapeConverter.inkscape_version = match.group(1)
+ logger.debug('Inkscape version: %s',
InkscapeConverter.inkscape_version)
+ return True
+ except subprocess.CalledProcessError:
+ return False
+ except (OSError, IOError):
+ logger.warning(__('Inkscape command %r cannot be run. '
+ 'Check the inkscape_converter_bin setting'),
+ self.config.inkscape_converter_bin)
+ return False
+
+ def convert(self, _from, _to):
+ # type: (unicode, unicode) -> bool
+ """Converts the image from SVG to PDF via Inkscape."""
+ try:
+ args = ([self.config.inkscape_converter_bin] +
+ self.config.inkscape_converter_args)
+ if InkscapeConverter.inkscape_version.startswith('1.') or not
InkscapeConverter.inkscape_version:
+ args += ['--export-filename=' + str(_to), str(_from)]
+ else:
+ import pathlib
+ # Guess output format based on file extension
+ fmt = pathlib.Path(str(_to)).suffix[1:]
+ args += [f'--export-{fmt}=' + str(_to), str(_from)]
+ logger.debug('Invoking %r ...', args)
+ p = subprocess.Popen(args, stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ except OSError as err:
+ if err.errno != ENOENT: # No such file or directory
+ raise
+ logger.warning(__('Inkscape command %r cannot be run. '
+ 'Check the inkscape_converter_bin setting'),
+ self.config.inkscape_converter_bin)
+ return False
+
+ try:
+ stdout, stderr = p.communicate()
+ except (OSError, IOError) as err:
+ if err.errno not in (EPIPE, EINVAL):
+ raise
+ stdout, stderr = p.stdout.read(), p.stderr.read()
+ p.wait()
+ if p.returncode != 0:
+ raise ExtensionError(__('Inkscape exited with error:\n'
+ '[stderr]\n%s\n[stdout]\n%s') %
+ (stderr, stdout))
+
+ return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/inkscapeconverter.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/inkscapeconverter.py
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/inkscapeconverter.py
2023-01-13 19:14:15.000000000 +0100
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/inkscapeconverter.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,112 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- sphinxcontrib.inkscapeconverter
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Converts SVG images to PDF using Inkscape in case the builder does not
- support SVG images natively (e.g. LaTeX).
-
- :copyright: Copyright 2018-2023 by Stefan Wiehler
- <[email protected]>.
- :license: BSD, see LICENSE.txt for details.
-"""
-import re
-import subprocess
-
-from sphinx.errors import ExtensionError
-from sphinx.locale import __
-from sphinx.transforms.post_transforms.images import ImageConverter
-from sphinx.util import logging
-from errno import ENOENT, EPIPE, EINVAL
-
-if False:
- # For type annotation
- from typing import Any, Dict # NOQA
- from sphinx.application import Sphinx # NOQA
-
-
-logger = logging.getLogger(__name__)
-
-
-class InkscapeConverter(ImageConverter):
- conversion_rules = [
- ('image/svg+xml', 'application/pdf'),
- ]
-
- inkscape_version: str = ""
-
- def is_available(self):
- # type: () -> bool
- """Confirms if Inkscape is available or not."""
- try:
- args = [self.config.inkscape_converter_bin, '--version']
- logger.debug('Invoking %r ...', args)
- output = subprocess.check_output(
- args, stdin=subprocess.PIPE, stderr=subprocess.PIPE,
- universal_newlines=True)
- match = re.search('Inkscape (.+)', output)
- if not match:
- logger.warning(__('Inkscape command %r returned invalid
result: %s\n '
- 'Check the inkscape_converter_bin setting'),
- self.config.inkscape_converter_bin, output)
- return False
- InkscapeConverter.inkscape_version = match.group(1)
- logger.debug('Inkscape version: %s',
InkscapeConverter.inkscape_version)
- return True
- except subprocess.CalledProcessError:
- return False
- except (OSError, IOError):
- logger.warning(__('Inkscape command %r cannot be run. '
- 'Check the inkscape_converter_bin setting'),
- self.config.inkscape_converter_bin)
- return False
-
- def convert(self, _from, _to):
- # type: (unicode, unicode) -> bool
- """Converts the image from SVG to PDF via Inkscape."""
- try:
- args = ([self.config.inkscape_converter_bin] +
- self.config.inkscape_converter_args)
- if InkscapeConverter.inkscape_version.startswith('1.'):
- args += ['--export-filename=' + _to, _from]
- else:
- args += ['--export-pdf=' + _to, _from]
- logger.debug('Invoking %r ...', args)
- p = subprocess.Popen(args, stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- except OSError as err:
- if err.errno != ENOENT: # No such file or directory
- raise
- logger.warning(__('Inkscape command %r cannot be run. '
- 'Check the inkscape_converter_bin setting'),
- self.config.inkscape_converter_bin)
- return False
-
- try:
- stdout, stderr = p.communicate()
- except (OSError, IOError) as err:
- if err.errno not in (EPIPE, EINVAL):
- raise
- stdout, stderr = p.stdout.read(), p.stderr.read()
- p.wait()
- if p.returncode != 0:
- raise ExtensionError(__('Inkscape exited with error:\n'
- '[stderr]\n%s\n[stdout]\n%s') %
- (stderr, stdout))
-
- return True
-
-
-def setup(app):
- # type: (Sphinx) -> Dict[unicode, Any]
- app.add_post_transform(InkscapeConverter)
- app.add_config_value('inkscape_converter_bin', 'inkscape', 'env')
- app.add_config_value('inkscape_converter_args',
- ['--export-area-drawing'], 'env')
-
- return {
- 'version': 'builtin',
- 'parallel_read_safe': True,
- 'parallel_write_safe': True,
- }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/rsvgconverter/__init__.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/rsvgconverter/__init__.py
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/rsvgconverter/__init__.py
1970-01-01 01:00:00.000000000 +0100
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/rsvgconverter/__init__.py
2026-03-05 19:15:23.000000000 +0100
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+"""
+ sphinxcontrib.rsvgconverter
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Converts SVG images to PDF or PNG using libRSVG in case the builder does
not
+ support SVG images natively (e.g. LaTeX).
+
+ :copyright: Copyright 2018-2023 by Stefan Wiehler
+ <[email protected]>.
+ :license: BSD, see LICENSE.txt for details.
+"""
+from .rsvgconverter import RSVGConverter
+
+
+def setup(app):
+ # type: (Sphinx) -> Dict[unicode, Any]
+ app.add_post_transform(RSVGConverter)
+ app.add_config_value('rsvg_converter_bin', 'rsvg-convert', 'env')
+ # Applies to both PDF and PNG output
+ app.add_config_value('rsvg_converter_args', [], 'env')
+ # Only applies to PDF output
+ app.add_config_value('rsvg_converter_format', 'pdf', 'env')
+
+ return {
+ 'version': 'builtin',
+ 'parallel_read_safe': True,
+ 'parallel_write_safe': True,
+ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/rsvgconverter/rsvgconverter.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/rsvgconverter/rsvgconverter.py
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/rsvgconverter/rsvgconverter.py
1970-01-01 01:00:00.000000000 +0100
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/rsvgconverter/rsvgconverter.py
2026-03-05 19:15:23.000000000 +0100
@@ -0,0 +1,82 @@
+# -*- coding: utf-8 -*-
+# SPDX-License-Indentifier: BSD-2-Clause
+# Copyright (C) 2018-2023 Stefan Wiehler
<[email protected]>
+import pathlib
+import subprocess
+
+from sphinx.errors import ExtensionError
+from sphinx.locale import __
+from sphinx.transforms.post_transforms.images import ImageConverter
+from sphinx.util import logging
+from errno import ENOENT, EPIPE, EINVAL
+
+if False:
+ # For type annotation
+ from typing import Any, Dict # NOQA
+ from sphinx.application import Sphinx # NOQA
+
+
+logger = logging.getLogger(__name__)
+
+
+class RSVGConverter(ImageConverter):
+ conversion_rules = [
+ ('image/svg+xml', 'application/pdf'),
+ ('image/svg+xml', 'image/png'),
+ ]
+
+ def is_available(self):
+ # type: () -> bool
+ """Confirms if RSVG converter is available or not."""
+ try:
+ args = [self.config.rsvg_converter_bin, '--version']
+ logger.debug('Invoking %r ...', args)
+ ret = subprocess.call(args, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
+ if ret == 0:
+ return True
+ else:
+ return False
+ except (OSError, IOError):
+ logger.warning(__('RSVG converter command %r cannot be run. '
+ 'Check the rsvg_converter_bin setting'),
+ self.config.rsvg_converter_bin)
+ return False
+
+ def convert(self, _from, _to):
+ # type: (unicode, unicode) -> bool
+ """Converts the image from SVG to PDF or PNG via libRSVG."""
+ try:
+ # Guess output format based on file extension
+ fmt = pathlib.Path(str(_to)).suffix[1:]
+ # rsvg-convert supports different standards of PDF, so use the
+ # rsvg_converter_format config when building a PDF
+ if fmt == 'pdf':
+ fmt = self.config.rsvg_converter_format
+ args = ([self.config.rsvg_converter_bin] +
+ self.config.rsvg_converter_args +
+ ['--format=' + fmt,
+ '--output=' + str(_to), str(_from)])
+ logger.debug('Invoking %r ...', args)
+ p = subprocess.Popen(args, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
+ except OSError as err:
+ if err.errno != ENOENT: # No such file or directory
+ raise
+ logger.warning(__('RSVG converter command %r cannot be run. '
+ 'Check the rsvg_converter_bin setting'),
+ self.config.rsvg_converter_bin)
+ return False
+
+ try:
+ stdout, stderr = p.communicate()
+ except (OSError, IOError) as err:
+ if err.errno not in (EPIPE, EINVAL):
+ raise
+ stdout, stderr = p.stdout.read(), p.stderr.read()
+ p.wait()
+ if p.returncode != 0:
+ raise ExtensionError(__('RSVG converter exited with error:\n'
+ '[stderr]\n%s\n[stdout]\n%s') %
+ (stderr, stdout))
+
+ return True
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/rsvgconverter.py
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/rsvgconverter.py
--- old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib/rsvgconverter.py
2024-09-12 17:49:43.000000000 +0200
+++ new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib/rsvgconverter.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,96 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- sphinxcontrib.rsvgconverter
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Converts SVG images to PDF using libRSVG in case the builder does not
- support SVG images natively (e.g. LaTeX).
-
- :copyright: Copyright 2018-2023 by Stefan Wiehler
- <[email protected]>.
- :license: BSD, see LICENSE.txt for details.
-"""
-import subprocess
-
-from sphinx.errors import ExtensionError
-from sphinx.locale import __
-from sphinx.transforms.post_transforms.images import ImageConverter
-from sphinx.util import logging
-from errno import ENOENT, EPIPE, EINVAL
-
-if False:
- # For type annotation
- from typing import Any, Dict # NOQA
- from sphinx.application import Sphinx # NOQA
-
-
-logger = logging.getLogger(__name__)
-
-
-class RSVGConverter(ImageConverter):
- conversion_rules = [
- ('image/svg+xml', 'application/pdf'),
- ]
-
- def is_available(self):
- # type: () -> bool
- """Confirms if RSVG converter is available or not."""
- try:
- args = [self.config.rsvg_converter_bin, '--version']
- logger.debug('Invoking %r ...', args)
- ret = subprocess.call(args, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
- if ret == 0:
- return True
- else:
- return False
- except (OSError, IOError):
- logger.warning(__('RSVG converter command %r cannot be run. '
- 'Check the rsvg_converter_bin setting'),
- self.config.rsvg_converter_bin)
- return False
-
- def convert(self, _from, _to):
- # type: (unicode, unicode) -> bool
- """Converts the image from SVG to PDF via libRSVG."""
- try:
- args = ([self.config.rsvg_converter_bin] +
- self.config.rsvg_converter_args +
- ['--format=' + self.config.rsvg_converter_format,
- '--output=' + _to, _from])
- logger.debug('Invoking %r ...', args)
- p = subprocess.Popen(args, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
- except OSError as err:
- if err.errno != ENOENT: # No such file or directory
- raise
- logger.warning(__('RSVG converter command %r cannot be run. '
- 'Check the rsvg_converter_bin setting'),
- self.config.rsvg_converter_bin)
- return False
-
- try:
- stdout, stderr = p.communicate()
- except (OSError, IOError) as err:
- if err.errno not in (EPIPE, EINVAL):
- raise
- stdout, stderr = p.stdout.read(), p.stderr.read()
- p.wait()
- if p.returncode != 0:
- raise ExtensionError(__('RSVG converter exited with error:\n'
- '[stderr]\n%s\n[stdout]\n%s') %
- (stderr, stdout))
-
- return True
-
-
-def setup(app):
- # type: (Sphinx) -> Dict[unicode, Any]
- app.add_post_transform(RSVGConverter)
- app.add_config_value('rsvg_converter_bin', 'rsvg-convert', 'env')
- app.add_config_value('rsvg_converter_args', [], 'env')
- app.add_config_value('rsvg_converter_format', 'pdf', 'env')
-
- return {
- 'version': 'builtin',
- 'parallel_read_safe': True,
- 'parallel_write_safe': True,
- }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib_svg2pdfconverter.egg-info/PKG-INFO
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib_svg2pdfconverter.egg-info/PKG-INFO
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib_svg2pdfconverter.egg-info/PKG-INFO
2024-09-12 18:24:58.000000000 +0200
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib_svg2pdfconverter.egg-info/PKG-INFO
2026-03-05 19:22:26.000000000 +0100
@@ -1,35 +1,33 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: sphinxcontrib-svg2pdfconverter
-Version: 1.2.3
-Summary: Sphinx SVG to PDF converter extension
-Home-page:
https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter
-Download-URL: https://pypi.org/project/sphinxcontrib-svg2pdfconverter
-Author: Stefan Wiehler
-Author-email: [email protected]
-License: BSD
-Platform: any
+Version: 2.1.0
+Summary: Sphinx SVG to PDF or PNG converter extension
+Author-email: Stefan Wiehler <[email protected]>
+License-Expression: BSD-2-Clause
+Project-URL: Homepage,
https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter
+Project-URL: Download, https://pypi.org/project/sphinxcontrib-svg2pdfconverter
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
+Classifier: Framework :: Sphinx :: Extension
Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
-Classifier: Framework :: Sphinx :: Extension
Classifier: Topic :: Documentation
Classifier: Topic :: Utilities
-Requires-Python: ~=3.4
+Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
Requires-Dist: Sphinx>=1.6.3
Provides-Extra: cairosvg
Requires-Dist: cairosvg>=1.0; extra == "cairosvg"
+Dynamic: license-file
-*************************************
-Sphinx SVG to PDF Converter Extension
-*************************************
+********************************************
+Sphinx SVG to PDF or PNG Converter Extension
+********************************************
-This extension converts SVG images to PDF in case the builder does not support
+This extension converts SVG images to PDF or PNG in case the builder does not
support
SVG images natively (e.g. LaTeX).
Internally, either `Inkscape <https://inkscape.org/>`_, ``rsvg-convert``
@@ -86,9 +84,10 @@
Path to RSVG converter binary. By default, this is ``rsvg-convert``.
``rsvg_converter_format``
- The value provided to the RSVG converter's ``--format`` argument. In more
- recent RSVG builds, the ``pdf1.5`` format will generate the fewest warnings
- with LaTeX backends. By default, this is ``pdf``.
+ The value provided to the RSVG converter's ``--format`` argument when
+ converting to PDF. In more recent RSVG builds, the ``pdf1.5`` format will
+ generate the fewest warnings with LaTeX backends.
+ By default, this is ``pdf``.
``rsvg_converter_args``
Additional command-line arguments for the RSVG converter, as a list. By
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib_svg2pdfconverter.egg-info/SOURCES.txt
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib_svg2pdfconverter.egg-info/SOURCES.txt
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib_svg2pdfconverter.egg-info/SOURCES.txt
2024-09-12 18:24:58.000000000 +0200
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib_svg2pdfconverter.egg-info/SOURCES.txt
2026-03-05 19:22:26.000000000 +0100
@@ -1,16 +1,15 @@
LICENSE.txt
-MANIFEST.in
README.rst
-setup.cfg
+pyproject.toml
setup.py
-sphinxcontrib/__init__.py
-sphinxcontrib/cairosvgconverter.py
-sphinxcontrib/inkscapeconverter.py
-sphinxcontrib/rsvgconverter.py
+sphinxcontrib/cairosvgconverter/__init__.py
+sphinxcontrib/cairosvgconverter/cairosvgconverter.py
+sphinxcontrib/inkscapeconverter/__init__.py
+sphinxcontrib/inkscapeconverter/inkscapeconverter.py
+sphinxcontrib/rsvgconverter/__init__.py
+sphinxcontrib/rsvgconverter/rsvgconverter.py
sphinxcontrib_svg2pdfconverter.egg-info/PKG-INFO
sphinxcontrib_svg2pdfconverter.egg-info/SOURCES.txt
sphinxcontrib_svg2pdfconverter.egg-info/dependency_links.txt
-sphinxcontrib_svg2pdfconverter.egg-info/namespace_packages.txt
-sphinxcontrib_svg2pdfconverter.egg-info/not-zip-safe
sphinxcontrib_svg2pdfconverter.egg-info/requires.txt
sphinxcontrib_svg2pdfconverter.egg-info/top_level.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib_svg2pdfconverter.egg-info/namespace_packages.txt
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib_svg2pdfconverter.egg-info/namespace_packages.txt
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib_svg2pdfconverter.egg-info/namespace_packages.txt
2024-09-12 18:24:58.000000000 +0200
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib_svg2pdfconverter.egg-info/namespace_packages.txt
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-sphinxcontrib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib_svg2pdfconverter.egg-info/not-zip-safe
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib_svg2pdfconverter.egg-info/not-zip-safe
---
old/sphinxcontrib_svg2pdfconverter-1.2.3/sphinxcontrib_svg2pdfconverter.egg-info/not-zip-safe
2022-10-08 10:38:26.000000000 +0200
+++
new/sphinxcontrib_svg2pdfconverter-2.1.0/sphinxcontrib_svg2pdfconverter.egg-info/not-zip-safe
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-