dev-python/xmlsec: new package, add 1.3.12-r3

Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
Andreas Billmeier 2023-07-16 19:55:12 +02:00 committed by Andreas Billmeier
parent 324db54fc7
commit 3776f6aad3
Signed by: onkelbeh
GPG Key ID: E6DB12C8C550F3C0
4 changed files with 101 additions and 0 deletions

View File

@ -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-r3.ebuild 1328 BLAKE2B 4133719a25c0e7ba2c5ea74925be88cfa36b971d0feabe6fbee780f2c68bd184c0704c49ec54e4369cfd912a8362f1af86483c7e75bb81a9854f8d0dc5155673 SHA512 3a332eb9d32878720f3281c71b6e57a23f8241a08633937408f0723ac2b7c19bf501fc0af8bd6f29643949d0cf51320fabb8d080d72c9f13ad9a258438814535
MISC metadata.xml 480 BLAKE2B 17abd324963ad808438f7c04a5785ab72e280a5ba8b132737d89c06fd17fc20e96478b4684ae84864bd03690bda6e865200a8eacf3bd0c23ceca4f0230bef1a5 SHA512 82d2b54886ba9d2eeba17aa04e2946c9dda8d30a5bea9a9ba7a5041b559971466c33ceb67ed35c9f865c052df09fb9fd057b46efd4d3d4314f456c8b1c0aaac7

View File

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

View File

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

View File

@ -0,0 +1,58 @@
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
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"
# Doesn't yet support xmlsec-1.3.0: https://github.com/xmlsec/python-xmlsec/issues/252
RDEPEND="
<dev-libs/xmlsec-1.3.0:=[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}