summaryrefslogtreecommitdiff
path: root/app-text/dblatex
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-14 00:09:04 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-14 00:09:04 +0100
commit5e41a38157bb40e8513e8e34426e85faba672fe7 (patch)
tree38e9365afd56c161d0e970ddf5420b2585130587 /app-text/dblatex
parent0ebcd2cbf178600b5eb36b2f24cdbb3d2f4a9000 (diff)
gentoo auto-resync : 14:06:2024 - 00:09:04
Diffstat (limited to 'app-text/dblatex')
-rw-r--r--app-text/dblatex/Manifest6
-rw-r--r--app-text/dblatex/dblatex-0.3.11-r1.ebuild62
-rw-r--r--app-text/dblatex/dblatex-0.3.12-r1.ebuild69
-rw-r--r--app-text/dblatex/dblatex-0.3.12-r3.ebuild95
-rw-r--r--app-text/dblatex/files/dblatex-0.3.12-adjust-submodule-imports.patch62
-rw-r--r--app-text/dblatex/files/dblatex-0.3.12-replace-imp-by-importlib.patch113
6 files changed, 273 insertions, 134 deletions
diff --git a/app-text/dblatex/Manifest b/app-text/dblatex/Manifest
index 37d6ee99eea6..7f7083e58621 100644
--- a/app-text/dblatex/Manifest
+++ b/app-text/dblatex/Manifest
@@ -3,9 +3,9 @@ AUX dblatex-0.3.11-inkscape-1.0.patch 4051 BLAKE2B 0c21ab019da8dec6ea093963f7938
AUX dblatex-0.3.11-no-inkscape-dependency.patch 753 BLAKE2B 2199d6068d86be9a0a63bb7cc034f54e8edf59434127e495d5878dfb761c990f9f106fbc0436513220ade66bb107030093f41c8e4777e6ccb279259aff912d06 SHA512 08f4e4473359a2633a785cd34fc3a89feaab8619843a93c5ffba0bf00e31aff2d1ce5a54aeea3eb51e63385b3480df1f196f54cdd568ff49558860460faa1c8f
AUX dblatex-0.3.11-path-logging.patch 554 BLAKE2B 7b078b4f0bacaffb3449122b561c264de8c8970fe4cbf5459c5ec651aecd3e3ccb7dcc95bfcc8277686133bc3187a5952edd1bc88dae11c2ddac3aa4060333b4 SHA512 ae08b08a435393bf94039edd8b74457a1d4475d8473fa450b41a993ca4ded08f79566bf2dc78144df977fe1f975e1c60b9d02b2dc4579f8c7d65839946e3de05
AUX dblatex-0.3.11-setup.patch 1751 BLAKE2B a83e41c4fa68eaee1b6e80404cd5486e64f117ca07314463ca0369cd3bc9d64dbdeb8f5fa2f44bee2704c37dda0e1564c461c7d39b1439aa76800032dd96acad SHA512 f77a82876fe28fdc6f9cc689c8b789fd09e703ca4625207fe81a35b1491bcd46a398eb78781fac60c33ac2efcd3d0957fb3604f8a54cd411b0fd4031016ef5fc
-DIST dblatex-0.3.11py3.tar.bz2 1671505 BLAKE2B 44e89f5f8d81105a3401074ad765479c04a495962c3efb3677cec81bf3b85c67a03585e7da8bdbd103cbea84e38d2bc633bd13704a5835c98d70fed644bfc6ba SHA512 48c1445c702e9c7c3ff83c57bb8a0caf5f4b027669a70887af0a23f75f5f99fb6840c4281b8bad9402910f3850af485d432e3109e5fd93184434cc87eb712695
+AUX dblatex-0.3.12-adjust-submodule-imports.patch 1995 BLAKE2B 11b5fdf9142b0e417bb401882cbcb753298fa94860b43c66c7b35b359905830aef7b635d9e2b67d5641d5056cd4361b193db379c5166fb18fbf9b397d54124d4 SHA512 d4cfe2a676a04d4d100c9ef70f180f3412f9276f52c87cc38ad53844d94f14159b995cef13b853148b1f97a990487f5bd3bb010b5c0f08e0afe1e3fe2b4b6d11
+AUX dblatex-0.3.12-replace-imp-by-importlib.patch 3883 BLAKE2B a747ece1ec3717ba14d107eca93789464b6383ab652b37de8dcec691af39b38685870d579caeed90741c1ee4dd319a2c8a32cf1e038aca9445740b99afaa116f SHA512 6d5f7b3b3573f28c2d42ad9dbd1cd3866f9e997b0acc0c09caa5329b54cd591c158ddaf26a39d690b8511b35d046f5f1a2e2a6e91601503952f190fdb8f3449c
DIST dblatex3-0.3.12.tar.bz2 1693272 BLAKE2B 9310ce5db3b5f92e183f2656c5b1881edaf0208ae4f78f853332c844258fa38d443921fc42c03301773b1451ce272a538c305d765acbdc6eafbdcf25ebf5d2d3 SHA512 5bfa774c8dbe362775f6bbb5e1196e5a2bb1af239778133c12ddc725406ced67f3ff422433a2a1aa02d4431e9be58ba12e918379deb81fcd5b96533d2bdf029a
-EBUILD dblatex-0.3.11-r1.ebuild 1827 BLAKE2B 34b52a951121ede45a6068422fcd3348b98fe3f5b764fa2eaa463a837c260a0dc881ffdfa7b2d63464062b1214e12f34a0ccf4c2b78942b81944b74ad86d1b9c SHA512 7c760c2e1caeb089c1b038535ee849becee4ce06fc9634a3c382b2f518ef81d60a9ab5869ca22f44efbc42dcb6be73d2d5237ea6940732bf09ce5fd793a0ca50
-EBUILD dblatex-0.3.12-r1.ebuild 1977 BLAKE2B c63e95a6027a96e34b389abdbb5e51c51933e0d445e2786f97609e72c25b3827dff2eee311e53cf5075f7d15e967de4c9a35077f25de67b5675052bc334f06e4 SHA512 a0c0e50ad18bd39a234840fcd042f49a89184b850a0d33ba5304190f1f2a0900e5135a3f71ca6b26b3ed204e31279f0cd6d244af2ac1ddca4a350a90f900ea98
EBUILD dblatex-0.3.12-r2.ebuild 1987 BLAKE2B a4aab0b72df094dd072609cf1d4f380520e8ee1dc0729084f1460348e5670fbf3296f8b03d2735ab24cc285c66b1b214c2f534628771b6352124460e5735cf19 SHA512 146d48b404b9e0b231c21ee6ecaa63f919b3fc8695c718d9014d0a732d5eb3830b2b6d2412c35b95cf2c450bff31d98f756251a7514584183f6931ba8097c671
+EBUILD dblatex-0.3.12-r3.ebuild 2491 BLAKE2B c5ea62fe45ac7909cab7d2c9e1122de23078d34b5d74992fea1a820dda698c21d66f1257201755fefb9cdecf01988cf510999f76390c8057e40f643d37eacb98 SHA512 eb7833294ec2ae43a257bcccf3fe2ea3ec9c3ee52ceaa0f06e391d6a1606532e5036fc15d89e5095b101ed8b321db81c29f01cf5de74d15bb5673f875e765b3e
MISC metadata.xml 908 BLAKE2B e13f176739b3fb7a63a5eaeb704afa1c0b4e9740ea25dec54656c283cf9f8f614096aae407df8822414e054eaad0082c738c0a5a2acc91a51ce3f6b729fc37d6 SHA512 a39c4073b4cec1753724d16bcca023c9306eeac79bc7f008c6e090f85c4661733810c9864b91b9552fbbec242c01a312780ee780d11724ce26399bad3c9a0899
diff --git a/app-text/dblatex/dblatex-0.3.11-r1.ebuild b/app-text/dblatex/dblatex-0.3.11-r1.ebuild
deleted file mode 100644
index 9524dda5731f..000000000000
--- a/app-text/dblatex/dblatex-0.3.11-r1.ebuild
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-PYTHON_COMPAT=( python3_{9,10} )
-
-inherit distutils-r1
-
-DESCRIPTION="Transform DocBook using TeX macros"
-HOMEPAGE="http://dblatex.sourceforge.net/"
-SRC_URI="https://downloads.sourceforge.net/project/dblatex/dblatex/${P}/${P}py3.tar.bz2"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
-IUSE="inkscape"
-
-RDEPEND="
- app-text/docbook-xml-dtd:4.5
- dev-libs/kpathsea
- dev-libs/libxslt
- dev-libs/libxslt
- dev-texlive/texlive-fontutils
- dev-texlive/texlive-latex
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-latexrecommended
- dev-texlive/texlive-mathscience
- dev-texlive/texlive-pictures
- dev-texlive/texlive-xetex
- gnome-base/librsvg
- media-gfx/imagemagick
- media-gfx/transfig
- inkscape? ( media-gfx/inkscape )
-"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${P}py3"
-
-PATCHES=(
- "${FILESDIR}/${P}-path-logging.patch"
- "${FILESDIR}/${P}-setup.patch"
- "${FILESDIR}/${P}-encode.patch"
-)
-
-python_prepare_all() {
- # Manual page is precomressed, but we will use our own compression later.
- gunzip docs/manpage/dblatex.1.gz || die
- # If we dont have inkscape we need to use an alternative SVG converter
- use inkscape || eapply "${FILESDIR}/${P}-no-inkscape-dependency.patch"
- # If we use inscape however we want to make dblatex compatible with v1.0
- use inkscape && eapply "${FILESDIR}/${P}-inkscape-1.0.patch"
- # We need to fix version information in the docs and some metadata
- grep -l -I -R "0.3.11py3" | xargs -n1 sed -i -e "s/${PV}py3/${PV}/" || die
- distutils-r1_python_prepare_all
-}
-
-python_install_all() {
- distutils-r1_python_install_all
- # Move package documentation to a folder name containing version number
- mv "${D}"/usr/share/doc/${PN} "${D}"/usr/share/doc/${PF} || die
-}
diff --git a/app-text/dblatex/dblatex-0.3.12-r1.ebuild b/app-text/dblatex/dblatex-0.3.12-r1.ebuild
deleted file mode 100644
index 8ea4d20f5ee6..000000000000
--- a/app-text/dblatex/dblatex-0.3.12-r1.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-# Breaks installation of /usr/bin/dblatex, bug #906788
-#DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit distutils-r1
-
-DESCRIPTION="Transform DocBook using TeX macros"
-HOMEPAGE="http://dblatex.sourceforge.net/"
-SRC_URI="https://downloads.sourceforge.net/project/dblatex/dblatex/${P}/${PN}3-${PV}.tar.bz2"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="inkscape test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- app-text/docbook-xml-dtd:4.5
- dev-libs/kpathsea
- dev-libs/libxslt
- dev-libs/libxslt
- dev-texlive/texlive-fontutils
- dev-texlive/texlive-latex
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-latexrecommended
- dev-texlive/texlive-mathscience
- dev-texlive/texlive-pictures
- dev-texlive/texlive-xetex
- gnome-base/librsvg
- media-gfx/imagemagick
- media-gfx/transfig
- inkscape? ( media-gfx/inkscape )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="${RDEPEND}
- test? ( ~${CATEGORY}/${P} )"
-
-S="${WORKDIR}/${PN}3-${PV}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.3.11-path-logging.patch"
- "${FILESDIR}/${PN}-0.3.11-setup.patch"
- "${FILESDIR}/${PN}-0.3.11-encode.patch"
-)
-
-python_prepare_all() {
- # Manual page is precomressed, but we will use our own compression later.
- gunzip docs/manpage/dblatex.1.gz || die
- # If we dont have inkscape we need to use an alternative SVG converter
- use inkscape || eapply "${FILESDIR}/${PN}-0.3.11-no-inkscape-dependency.patch"
- # If we use inscape however we want to make dblatex compatible with v1.0
- use inkscape && eapply "${FILESDIR}/${PN}-0.3.11-inkscape-1.0.patch"
- distutils-r1_python_prepare_all
-}
-
-python_install_all() {
- distutils-r1_python_install_all
- # Move package documentation to a folder name containing version number
- mv "${D}"/usr/share/doc/${PN} "${D}"/usr/share/doc/${PF} || die
-}
-
-python_test_all() {
- emake -C tests/mathml
-}
diff --git a/app-text/dblatex/dblatex-0.3.12-r3.ebuild b/app-text/dblatex/dblatex-0.3.12-r3.ebuild
new file mode 100644
index 000000000000..668691aed385
--- /dev/null
+++ b/app-text/dblatex/dblatex-0.3.12-r3.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Transform DocBook using TeX macros"
+HOMEPAGE="https://dblatex.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/project/dblatex/dblatex/${P}/${PN}3-${PV}.tar.bz2"
+S="${WORKDIR}/${PN}3-${PV}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="inkscape test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-text/docbook-xml-dtd:4.5
+ dev-libs/kpathsea
+ dev-libs/libxslt
+ dev-texlive/texlive-fontutils
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-latexrecommended
+ dev-texlive/texlive-mathscience
+ dev-texlive/texlive-pictures
+ dev-texlive/texlive-xetex
+ gnome-base/librsvg
+ media-gfx/imagemagick
+ >=media-gfx/fig2dev-3.2.9-r1
+ inkscape? ( media-gfx/inkscape )
+"
+DEPEND="
+ ${RDEPEND}
+"
+BDEPEND="
+ ${RDEPEND}
+ test? ( ~${CATEGORY}/${P}[${PYTHON_USEDEP}] )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.3.11-path-logging.patch"
+ "${FILESDIR}/${PN}-0.3.11-setup.patch"
+ "${FILESDIR}/${PN}-0.3.11-encode.patch"
+ "${FILESDIR}/${P}-replace-imp-by-importlib.patch"
+ "${FILESDIR}/${P}-adjust-submodule-imports.patch"
+)
+
+python_prepare_all() {
+ # Manual page is precomressed, but we will use our own compression later.
+ gunzip docs/manpage/dblatex.1.gz || die
+ if use inkscape; then
+ # If we use inscape we want to make dblatex compatible with v1.0
+ eapply "${FILESDIR}/${PN}-0.3.11-inkscape-1.0.patch"
+ else
+ # If we don't have inkscape we need to use an alternative SVG converter
+ eapply "${FILESDIR}/${PN}-0.3.11-no-inkscape-dependency.patch"
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ # After migrating to PEP517 setuptool's distutils behaves a bit differently.
+ # Rather than rewriting the entire build setup we follow Debian's path with
+ # a predefined script.
+ python_newscript - dblatex <<-EOF
+ #!${EPREFIX}/usr/bin/python
+ import sys
+ import os
+
+ package_base = r"${EPREFIX}/usr/share/dblatex"
+
+ from dbtexmf.dblatex import dblatex
+ dblatex.main(base=package_base)
+ EOF
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ # Move package documentation to a folder name containing version number
+ mv "${ED}"/usr/share/doc/${PN} "${ED}"/usr/share/doc/${PF} || die
+}
+
+python_test() {
+ emake -C tests/mathml
+}
diff --git a/app-text/dblatex/files/dblatex-0.3.12-adjust-submodule-imports.patch b/app-text/dblatex/files/dblatex-0.3.12-adjust-submodule-imports.patch
new file mode 100644
index 000000000000..9a09ede9db8e
--- /dev/null
+++ b/app-text/dblatex/files/dblatex-0.3.12-adjust-submodule-imports.patch
@@ -0,0 +1,62 @@
+From f5ce76603178e5465a744cb4feed4686489bebb9 Mon Sep 17 00:00:00 2001
+Message-ID: <f5ce76603178e5465a744cb4feed4686489bebb9.1688648379.git.github@grubix.eu>
+From: Michael J Gruber <github@grubix.eu>
+Date: Thu, 6 Jul 2023 14:58:03 +0200
+Subject: [PATCH] Python 3.12 compatibility: adjust submodule imports
+
+importlib imports behave differently in py 3.11 and py 3.12: py 3.12
+requires explicit imports of the submodules.
+
+While fixing this, reduce the imports to the used submodules. Currently,
+the base is still imported automatically.
+---
+ lib/dbtexmf/core/dbtex.py | 3 ++-
+ lib/dbtexmf/dblatex/grubber/plugins.py | 3 ++-
+ lib/dbtexmf/xslt/xslt.py | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/lib/dbtexmf/core/dbtex.py b/lib/dbtexmf/core/dbtex.py
+index adac781..4cf9591 100644
+--- a/lib/dbtexmf/core/dbtex.py
++++ b/lib/dbtexmf/core/dbtex.py
+@@ -15,7 +15,8 @@ try:
+ except ImportError:
+ from urllib.request import pathname2url
+ import glob
+-import importlib
++import importlib.machinery
++import importlib.util
+ from optparse import OptionParser
+ from io import open
+
+diff --git a/lib/dbtexmf/dblatex/grubber/plugins.py b/lib/dbtexmf/dblatex/grubber/plugins.py
+index 047f2bb..6b4ecb4 100644
+--- a/lib/dbtexmf/dblatex/grubber/plugins.py
++++ b/lib/dbtexmf/dblatex/grubber/plugins.py
+@@ -4,7 +4,8 @@
+ Mechanisms to dynamically load extra modules to help the LaTeX compilation.
+ All the modules must be derived from the TexModule class.
+ """
+-import importlib
++import importlib.machinery
++import importlib.util
+
+ from os.path import *
+ from dbtexmf.dblatex.grubber.msg import _, msg
+diff --git a/lib/dbtexmf/xslt/xslt.py b/lib/dbtexmf/xslt/xslt.py
+index 57c99a2..7cc2038 100644
+--- a/lib/dbtexmf/xslt/xslt.py
++++ b/lib/dbtexmf/xslt/xslt.py
+@@ -2,7 +2,8 @@
+ # Very simple plugin loader for Xslt classes
+ #
+ import os
+-import importlib
++import importlib.machinery
++import importlib.util
+ import glob
+ import sys
+
+--
+2.41.0.411.gd9071d4297
+
diff --git a/app-text/dblatex/files/dblatex-0.3.12-replace-imp-by-importlib.patch b/app-text/dblatex/files/dblatex-0.3.12-replace-imp-by-importlib.patch
new file mode 100644
index 000000000000..0531733c7f55
--- /dev/null
+++ b/app-text/dblatex/files/dblatex-0.3.12-replace-imp-by-importlib.patch
@@ -0,0 +1,113 @@
+diff --git a/lib/dbtexmf/core/dbtex.py b/lib/dbtexmf/core/dbtex.py
+index b3ec732..adac781 100644
+--- a/lib/dbtexmf/core/dbtex.py
++++ b/lib/dbtexmf/core/dbtex.py
+@@ -15,7 +15,7 @@ try:
+ except ImportError:
+ from urllib.request import pathname2url
+ import glob
+-import imp
++import importlib
+ from optparse import OptionParser
+ from io import open
+
+@@ -540,15 +540,14 @@ class DbTexCommand:
+
+ def load_plugin(self, pathname):
+ moddir, modname = os.path.split(pathname)
+- try:
+- filemod, path, descr = imp.find_module(modname, [moddir])
+- except ImportError:
+- try:
+- filemod, path, descr = imp.find_module(modname)
+- except ImportError:
+- failed_exit("Error: '%s' module not found" % modname)
+- mod = imp.load_module(modname, filemod, path, descr)
+- filemod.close()
++ spec = importlib.machinery.PathFinder.find_spec(modname, [moddir])
++ if not spec:
++ spec = importlib.machinery.PathFinder.find_spec(modname)
++ if not spec:
++ failed_exit("Error: '%s' module not found" % modname)
++ mod = importlib.util.module_from_spec(spec)
++ spec.loader.exec_module(mod)
++ sys.modules[modname] = mod
+ return mod
+
+ def run_setup(self, options):
+diff --git a/lib/dbtexmf/dblatex/grubber/plugins.py b/lib/dbtexmf/dblatex/grubber/plugins.py
+index 9e333c9..047f2bb 100644
+--- a/lib/dbtexmf/dblatex/grubber/plugins.py
++++ b/lib/dbtexmf/dblatex/grubber/plugins.py
+@@ -4,7 +4,7 @@
+ Mechanisms to dynamically load extra modules to help the LaTeX compilation.
+ All the modules must be derived from the TexModule class.
+ """
+-import imp
++import importlib
+
+ from os.path import *
+ from dbtexmf.dblatex.grubber.msg import _, msg
+@@ -108,17 +108,16 @@ class Plugins (object):
+ """
+ if name in self.modules:
+ return 2
+- try:
+- file, path, descr = imp.find_module(name, [""])
+- except ImportError:
++ spec = importlib.machinery.PathFinder.find_spec(name, [""])
++ if not spec:
+ if not self.path:
+ return 0
+- try:
+- file, path, descr = imp.find_module(name, self.path)
+- except ImportError:
+- return 0
+- module = imp.load_module(name, file, path, descr)
+- file.close()
++ spec = importlib.machinery.PathFinder.find_spec(name, self.path)
++ if not spec:
++ return 0
++ module = importlib.util.module_from_spec(spec)
++ spec.loader.exec_module(module)
++ sys.modules[name] = module
+ self.modules[name] = module
+ return 1
+
+diff --git a/lib/dbtexmf/xslt/xslt.py b/lib/dbtexmf/xslt/xslt.py
+index 0350e30..57c99a2 100644
+--- a/lib/dbtexmf/xslt/xslt.py
++++ b/lib/dbtexmf/xslt/xslt.py
+@@ -2,20 +2,21 @@
+ # Very simple plugin loader for Xslt classes
+ #
+ import os
+-import imp
++import importlib
+ import glob
++import sys
+
+ def load(modname):
+- try:
+- file, path, descr = imp.find_module(modname, [""])
+- except ImportError:
+- try:
+- file, path, descr = imp.find_module(modname,
+- [os.path.dirname(__file__)])
+- except ImportError:
+- raise ValueError("Xslt '%s' not found" % modname)
+- mod = imp.load_module(modname, file, path, descr)
+- file.close()
++ spec = importlib.machinery.PathFinder.find_spec(modname, [""])
++ if not spec:
++ spec = importlib.machinery.PathFinder.find_spec(modname,
++ [os.path.dirname(__file__)])
++ if not spec:
++ raise ValueError("Xslt '%s' not found" % modname)
++
++ mod = importlib.util.module_from_spec(spec)
++ spec.loader.exec_module(mod)
++ sys.modules[modname] = mod
+ o = mod.Xslt()
+ return o
+