diff options
author | Sam James <sam@gentoo.org> | 2022-06-21 06:47:10 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-21 06:47:47 +0100 |
commit | 6d03a3b62fd6d8a615a20ef4424a6e031be2b5fe (patch) | |
tree | cd274ecf5fb1941939c01064b79c498b49ca7bfb /dev-python/imapclient | |
parent | dev-python/reflink: drop broken PEP517 (diff) | |
download | gentoo-6d03a3b62fd6d8a615a20ef4424a6e031be2b5fe.tar.gz gentoo-6d03a3b62fd6d8a615a20ef4424a6e031be2b5fe.tar.bz2 gentoo-6d03a3b62fd6d8a615a20ef4424a6e031be2b5fe.zip |
dev-python/imapclient: fix Python 3.10+
Closes: https://bugs.gentoo.org/835498
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/imapclient')
-rw-r--r-- | dev-python/imapclient/Manifest | 1 | ||||
-rwxr-xr-x | dev-python/imapclient/files/imapclient-2.2.0-ssl-context.patch | 13 | ||||
-rw-r--r-- | dev-python/imapclient/imapclient-2.2.0-r1.ebuild | 31 |
3 files changed, 45 insertions, 0 deletions
diff --git a/dev-python/imapclient/Manifest b/dev-python/imapclient/Manifest index 59232385963d..2dc9dc7037ff 100644 --- a/dev-python/imapclient/Manifest +++ b/dev-python/imapclient/Manifest @@ -1 +1,2 @@ +DIST imapclient-2.2.0.gh.tar.gz 89505 BLAKE2B 448e8c736cd80f261c50dd7d6fe88498bf988e475f8135bf7079021d0154904741ab8af28c0ede817ec1bd8c7bd329b1c891c24e37c3466d68287afa02d636c7 SHA512 ace8f55e0f7f4dbb9127b2bbf26cce4c12dce40357cf8127aa6e377321d5156f91f913bd4d4ca57bd5b7f0c86ae5d0b7fdf352b74a6edb7d607f46aa45a144a2 DIST imapclient-2.2.0.tar.gz 89505 BLAKE2B 448e8c736cd80f261c50dd7d6fe88498bf988e475f8135bf7079021d0154904741ab8af28c0ede817ec1bd8c7bd329b1c891c24e37c3466d68287afa02d636c7 SHA512 ace8f55e0f7f4dbb9127b2bbf26cce4c12dce40357cf8127aa6e377321d5156f91f913bd4d4ca57bd5b7f0c86ae5d0b7fdf352b74a6edb7d607f46aa45a144a2 diff --git a/dev-python/imapclient/files/imapclient-2.2.0-ssl-context.patch b/dev-python/imapclient/files/imapclient-2.2.0-ssl-context.patch new file mode 100755 index 000000000000..b3a12823f6a5 --- /dev/null +++ b/dev-python/imapclient/files/imapclient-2.2.0-ssl-context.patch @@ -0,0 +1,13 @@ +https://github.com/mjs/imapclient/issues/466 +https://bugs.gentoo.org/835498 +--- a/imapclient/tls.py ++++ b/imapclient/tls.py +@@ -27,7 +27,7 @@ def wrap_socket(sock, ssl_context, host): + return ssl.wrap_socket(sock) + + if ssl_context is None: +- ssl_context = ssl.create_default_context() ++ ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH) + + return ssl_context.wrap_socket(sock, server_hostname=host) + diff --git a/dev-python/imapclient/imapclient-2.2.0-r1.ebuild b/dev-python/imapclient/imapclient-2.2.0-r1.ebuild new file mode 100644 index 000000000000..520ba497b462 --- /dev/null +++ b/dev-python/imapclient/imapclient-2.2.0-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) + +inherit distutils-r1 + +DESCRIPTION="easy-to-use, pythonic, and complete IMAP client library" +HOMEPAGE="https://github.com/mjs/imapclient" +SRC_URI="https://github.com/mjs/imapclient/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples" + +RDEPEND="dev-python/six[${PYTHON_USEDEP}]" + +PATCHES=( + "${FILESDIR}"/${PN}-2.2.0-ssl-context.patch +) + +distutils_enable_sphinx doc/src +distutils_enable_tests unittest + +python_install_all() { + distutils-r1_python_install_all + use examples && dodoc -r examples +} |