summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-02-17 11:48:29 +0100
committerMichał Górny <mgorny@gentoo.org>2023-02-17 12:03:32 +0100
commit00c238bbf1bc0d048ac6cbb702a0f6b5109abec5 (patch)
tree7fd8f6aebf32d918fdc8b9a554d7b3598e7f9e00 /dev-python/xmlsec
parentdev-python/python-xmlsec: Add MY_P prior to renaming (diff)
downloadgentoo-00c238bbf1bc0d048ac6cbb702a0f6b5109abec5.tar.gz
gentoo-00c238bbf1bc0d048ac6cbb702a0f6b5109abec5.tar.bz2
gentoo-00c238bbf1bc0d048ac6cbb702a0f6b5109abec5.zip
Rename dev-python/{python-xmlsec → xmlsec}
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/xmlsec')
-rw-r--r--dev-python/xmlsec/Manifest1
-rw-r--r--dev-python/xmlsec/files/xmlsec-1.3.11-fix-xml-testfail.patch23
-rw-r--r--dev-python/xmlsec/metadata.xml16
-rw-r--r--dev-python/xmlsec/xmlsec-1.3.12-r1.ebuild56
4 files changed, 96 insertions, 0 deletions
diff --git a/dev-python/xmlsec/Manifest b/dev-python/xmlsec/Manifest
new file mode 100644
index 000000000000..8bd1049057d4
--- /dev/null
+++ b/dev-python/xmlsec/Manifest
@@ -0,0 +1 @@
+DIST python-xmlsec-1.3.12.gh.tar.gz 77722 BLAKE2B b5ecece8063b823cdbe4d58967d10026bdc6f3774954021a3739d579ba3c5a08130af1792921c7892e6bc3d00f88ac83ab30e862775e419e0dad40b990b10cbe SHA512 19c5e3bf58b4b0f8a1cca3e60c08348b02ae298620f8c02b8cfb325aecf0313cb2bd1af89507b754ebe4c35af3b031e232d15ddcd42deae0821c9c0d7571aa7c
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}