diff options
Diffstat (limited to 'dev-python/xmlsec')
-rw-r--r-- | dev-python/xmlsec/Manifest | 4 | ||||
-rw-r--r-- | dev-python/xmlsec/files/xmlsec-1.3.11-fix-xml-testfail.patch | 23 | ||||
-rw-r--r-- | dev-python/xmlsec/metadata.xml | 16 | ||||
-rw-r--r-- | dev-python/xmlsec/xmlsec-1.3.12-r1.ebuild | 56 |
4 files changed, 99 insertions, 0 deletions
diff --git a/dev-python/xmlsec/Manifest b/dev-python/xmlsec/Manifest new file mode 100644 index 000000000000..66508a4e3d33 --- /dev/null +++ b/dev-python/xmlsec/Manifest @@ -0,0 +1,4 @@ +AUX xmlsec-1.3.11-fix-xml-testfail.patch 879 BLAKE2B 3d655b40a67b44a4abd65188c6d719e12063e857942fdb112b47da38977864252e3d250e0bbaf5c86f4688bb7701aae89df444c4fef0e3f0eaffc98fe5b6b856 SHA512 8c8f9af415dc9207e5c0599ee958dff6558618f94a9cb3c583b1c9eb6d1de251d714edf1afdee581cb33c7543f88c54d36af9b6f903fe31994a86f1b602e4c75 +DIST python-xmlsec-1.3.12.gh.tar.gz 77722 BLAKE2B b5ecece8063b823cdbe4d58967d10026bdc6f3774954021a3739d579ba3c5a08130af1792921c7892e6bc3d00f88ac83ab30e862775e419e0dad40b990b10cbe SHA512 19c5e3bf58b4b0f8a1cca3e60c08348b02ae298620f8c02b8cfb325aecf0313cb2bd1af89507b754ebe4c35af3b031e232d15ddcd42deae0821c9c0d7571aa7c +EBUILD xmlsec-1.3.12-r1.ebuild 1217 BLAKE2B b0aa6ac7f638ac2aa45b7ac095fa4ec1e1eb928580d314bb343506e378c6016a8d1cf6df50f3bebc806c97386817743cf79a823da51593a5e3b0b7b06ff01c7a SHA512 e99bef94e929f246bbc596c9213e341900173d3d8b17f0370ed36870add1a2da2fad8eb22529159b8b7bc4cd9cb7e5cfc17e5757b4d643ec1da6e9cca2801db6 +MISC metadata.xml 480 BLAKE2B 17abd324963ad808438f7c04a5785ab72e280a5ba8b132737d89c06fd17fc20e96478b4684ae84864bd03690bda6e865200a8eacf3bd0c23ceca4f0230bef1a5 SHA512 82d2b54886ba9d2eeba17aa04e2946c9dda8d30a5bea9a9ba7a5041b559971466c33ceb67ed35c9f865c052df09fb9fd057b46efd4d3d4314f456c8b1c0aaac7 diff --git a/dev-python/xmlsec/files/xmlsec-1.3.11-fix-xml-testfail.patch b/dev-python/xmlsec/files/xmlsec-1.3.11-fix-xml-testfail.patch new file mode 100644 index 000000000000..3e7ab8829c2f --- /dev/null +++ b/dev-python/xmlsec/files/xmlsec-1.3.11-fix-xml-testfail.patch @@ -0,0 +1,23 @@ +Taken from: https://github.com/mehcode/python-xmlsec/issues/84#issuecomment-632930116 +diff --git a/tests/base.py b/tests/base.py +index b05de1d..5ec356f 100644 +--- a/tests/base.py ++++ b/tests/base.py +@@ -94,6 +94,7 @@ class TestMemoryLeaks(unittest.TestCase): + + def load_xml(self, name, xpath=None): + """returns xml.etree""" ++ etree.set_default_parser(parser=etree.XMLParser()) + root = etree.parse(self.path(name)).getroot() + if xpath is None: + return root +diff --git a/tests/test_doc_examples.py b/tests/test_doc_examples.py +index 2fc490f..53d2377 100644 +--- a/tests/test_doc_examples.py ++++ b/tests/test_doc_examples.py +@@ -42,3 +42,5 @@ def test_doc_example(example): + """ + with cd(example.parent): + runpy.run_path(str(example)) ++ from lxml import etree ++ etree.set_default_parser(parser=etree.XMLParser()) diff --git a/dev-python/xmlsec/metadata.xml b/dev-python/xmlsec/metadata.xml new file mode 100644 index 000000000000..c75425b41ecf --- /dev/null +++ b/dev-python/xmlsec/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>chutzpah@gentoo.org</email> + <name>Patrick McLean</name> + </maintainer> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="github">xmlsec/python-xmlsec</remote-id> + <remote-id type="pypi">xmlsec</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/xmlsec/xmlsec-1.3.12-r1.ebuild b/dev-python/xmlsec/xmlsec-1.3.12-r1.ebuild new file mode 100644 index 000000000000..f465d6032766 --- /dev/null +++ b/dev-python/xmlsec/xmlsec-1.3.12-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) + +inherit distutils-r1 + +MY_P=python-xmlsec-${PV} +DESCRIPTION="Python bindings for the XML Security Library" +HOMEPAGE=" + https://github.com/xmlsec/python-xmlsec/ + https://pypi.org/project/xmlsec/ +" +SRC_URI=" + https://github.com/xmlsec/python-xmlsec/archive/${PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 ~ppc64 x86" + +RDEPEND=" + dev-libs/xmlsec:=[openssl] + dev-python/lxml[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-python/pkgconfig[${PYTHON_USEDEP}] + dev-python/setuptools_scm[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + test? ( + dev-python/hypothesis[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.3.11-fix-xml-testfail.patch" +) + +EPYTEST_DESELECT=( + # Fragile based on black version? + tests/test_type_stubs.py::test_xmlsec_constants_stub + + # Broken with xmlsec-1.2.36+. + # https://github.com/xmlsec/python-xmlsec/issues/244 + tests/test_ds.py::TestSignContext::test_sign_case5 +) + +distutils_enable_tests pytest + +export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} |