diff options
Diffstat (limited to 'gnu/packages/aux-files')
-rw-r--r-- | gnu/packages/aux-files/python/sanity-check-next.py | 99 | ||||
-rw-r--r-- | gnu/packages/aux-files/python/sanity-check.py | 8 | ||||
-rw-r--r-- | gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml | 31 | ||||
-rw-r--r-- | gnu/packages/aux-files/xml/patch-catalog-xml.xsl | 24 |
4 files changed, 61 insertions, 101 deletions
diff --git a/gnu/packages/aux-files/python/sanity-check-next.py b/gnu/packages/aux-files/python/sanity-check-next.py deleted file mode 100644 index a206b51d0a..0000000000 --- a/gnu/packages/aux-files/python/sanity-check-next.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# GNU Guix --- Functional package management for GNU -# Copyright © 2021, 2022 Lars-Dominik Braun <lars@6xq.net> -# -# This file is part of GNU Guix. -# -# GNU Guix is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or (at -# your option) any later version. -# -# GNU Guix is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. - -# This version adds a small change to accommodate missing python-setuptools. -# TODO: Merge with sanity-check.py in the next core-updates cycle. - -from __future__ import print_function # Python 2 support. -import importlib -import sys -import traceback -try: - import pkg_resources -except ImportError: - print('Warning: Skipping, because python-setuptools are not available.') - sys.exit(0) - -try: - from importlib.machinery import PathFinder -except ImportError: - PathFinder = None - -ret = 0 - -# Only check site-packages installed by this package, but not dependencies -# (which pkg_resources.working_set would include). Path supplied via argv. -ws = pkg_resources.find_distributions(sys.argv[1]) - -for dist in ws: - print('validating', repr(dist.project_name), dist.location) - try: - print('...checking requirements: ', end='') - req = str(dist.as_requirement()) - # dist.activate() is not enough to actually check requirements, we - # have to .require() it. - pkg_resources.require(req) - print('OK') - except Exception as e: - print('ERROR:', req, repr(e)) - ret = 1 - continue - - # Try to load top level modules. This should not have any side-effects. - try: - metalines = dist.get_metadata_lines('top_level.txt') - except (KeyError, EnvironmentError): - # distutils (i.e. #:use-setuptools? #f) will not install any metadata. - # This file is also missing for packages built using a PEP 517 builder - # such as poetry. - print('WARNING: cannot determine top-level modules') - continue - for name in metalines: - # Only available on Python 3. - if PathFinder and PathFinder.find_spec(name) is None: - # Ignore unavailable modules, often C modules, which were not - # installed at the top-level. Cannot use ModuleNotFoundError, - # because it is raised by failed imports too. - continue - try: - print('...trying to load module', name, end=': ') - importlib.import_module(name) - print('OK') - except Exception: - print('ERROR:') - traceback.print_exc(file=sys.stdout) - ret = 1 - - # Try to load entry points of console scripts too, making sure they - # work. They should be removed if they don't. Other groups may not be - # safe, as they can depend on optional packages. - for group, v in dist.get_entry_map().items(): - if group not in {'console_scripts', 'gui_scripts'}: - continue - for name, ep in v.items(): - try: - print('...trying to load endpoint', group, name, end=': ') - ep.load() - print('OK') - except Exception: - print('ERROR:') - traceback.print_exc(file=sys.stdout) - ret = 1 - -sys.exit(ret) diff --git a/gnu/packages/aux-files/python/sanity-check.py b/gnu/packages/aux-files/python/sanity-check.py index 182133bb3d..9c39709e18 100644 --- a/gnu/packages/aux-files/python/sanity-check.py +++ b/gnu/packages/aux-files/python/sanity-check.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # GNU Guix --- Functional package management for GNU -# Copyright © 2021 Lars-Dominik Braun <lars@6xq.net> +# Copyright © 2021, 2022 Lars-Dominik Braun <lars@6xq.net> # # This file is part of GNU Guix. # @@ -19,9 +19,13 @@ from __future__ import print_function # Python 2 support. import importlib -import pkg_resources import sys import traceback +try: + import pkg_resources +except ImportError: + print('Warning: Skipping, because python-setuptools are not available.') + sys.exit(0) try: from importlib.machinery import PathFinder diff --git a/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml b/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml new file mode 100644 index 0000000000..cfb1849202 --- /dev/null +++ b/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" uri="docbookx.dtd"/> + <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.1.2//EN" uri="calstblx.dtd"/> + <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN" uri="soextblx.dtd"/> + <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.1.2//EN" uri="dbpoolx.mod"/> + <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.1.2//EN" uri="dbhierx.mod"/> + <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.1.2//EN" uri="dbgenent.mod"/> + <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.1.2//EN" uri="dbnotnx.mod"/> + <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.1.2//EN" uri="dbcentx.mod"/> + <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN" uri="ent/iso-dia.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN" uri="ent/iso-num.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Publishing//EN" uri="ent/iso-pub.ent"/> + <public publicId="ISO 8879:1986//ENTITIES General Technical//EN" uri="ent/iso-tech.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN" uri="ent/iso-lat1.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN" uri="ent/iso-lat2.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN" uri="ent/iso-grk1.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN" uri="ent/iso-grk2.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN" uri="ent/iso-grk3.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN" uri="ent/iso-grk4.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN" uri="ent/iso-amsa.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN" uri="ent/iso-amsb.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN" uri="ent/iso-amsc.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" uri="ent/iso-amsn.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN" uri="ent/iso-amso.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN" uri="ent/iso-amsr.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN" uri="ent/iso-box.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN" uri="ent/iso-cyr1.ent"/> + <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN" uri="ent/iso-cyr2.ent"/> +</catalog> diff --git a/gnu/packages/aux-files/xml/patch-catalog-xml.xsl b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl new file mode 100644 index 0000000000..947517476d --- /dev/null +++ b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +SPDX-FileCopyrightText: 2023 Bruno Victal <mirai@makinata.eu> +SPDX-License-Identifier: ISC + +Fix uri attributes to point to paths in the store. +--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="xml"/> + <xsl:param name="prefix">/</xsl:param> + <!-- begin identity transform --> + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + <!-- end identity transform --> + + <xsl:template match="@uri"> + <xsl:attribute name="uri"> + <xsl:value-of select="concat('file://', $prefix, '/', .)"/> + </xsl:attribute> + </xsl:template> +</xsl:stylesheet> |