commit:     a7215e3fbc947086e89588c56bc43451580fa5d7
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  2 22:26:04 2022 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Nov  2 23:40:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7215e3f

dev-python/boto: update EAPI 7 -> 8

Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-python/boto/boto-2.49.0-r5.ebuild             | 63 +++++++++++++++++++++++
 dev-python/boto/files/boto-2.49.0-mock-spec.patch | 12 +++++
 2 files changed, 75 insertions(+)

diff --git a/dev-python/boto/boto-2.49.0-r5.ebuild 
b/dev-python/boto/boto-2.49.0-r5.ebuild
new file mode 100644
index 000000000000..565ac4250172
--- /dev/null
+++ b/dev-python/boto/boto-2.49.0-r5.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+DESCRIPTION="Amazon Web Services API"
+HOMEPAGE="https://github.com/boto/boto https://pypi.org/project/boto/";
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos"
+
+PATCHES=(
+       # taken from https://bugs.debian.org/909545
+       "${FILESDIR}"/${P}-try-to-add-SNI-support-v3.patch
+       "${FILESDIR}"/${P}-py38.patch
+       "${FILESDIR}"/${P}-py3-socket-binary.patch
+       "${FILESDIR}"/${P}-py3-httplib-strict.patch
+       "${FILESDIR}"/${P}-py3-server-port.patch
+       "${FILESDIR}"/${P}-unbundle-six.patch
+       "${FILESDIR}"/${P}-py310.patch
+       "${FILESDIR}"/${P}-mock-spec.patch
+)
+
+RDEPEND="
+       >=dev-python/six-1.12.0[${PYTHON_USEDEP}]
+"
+
+BDEPEND="
+       test? (
+               dev-python/httpretty[${PYTHON_USEDEP}]
+               dev-python/keyring[${PYTHON_USEDEP}]
+               dev-python/lxml[${PYTHON_USEDEP}]
+               dev-python/mock[${PYTHON_USEDEP}]
+               dev-python/paramiko[${PYTHON_USEDEP}]
+               dev-python/requests[${PYTHON_USEDEP}]
+               dev-python/rsa[${PYTHON_USEDEP}]
+               dev-python/selenium[${PYTHON_USEDEP}]
+       )"
+
+distutils_enable_tests nose
+
+src_prepare() {
+       # remove bundled libs.
+       rm -f "${S}"/boto/vendored/six.py || die
+       # broken, not worth fixing
+       rm tests/unit/cloudfront/test_signed_urls.py || die
+       # fix tests
+       mkdir -p "${HOME}"/.ssh || die
+       touch "${HOME}"/.ssh/known_hosts || die
+
+       distutils-r1_src_prepare
+}
+
+python_test() {
+       distutils-r1_python_test tests/unit
+}

diff --git a/dev-python/boto/files/boto-2.49.0-mock-spec.patch 
b/dev-python/boto/files/boto-2.49.0-mock-spec.patch
new file mode 100644
index 000000000000..d8c8db2f1e9f
--- /dev/null
+++ b/dev-python/boto/files/boto-2.49.0-mock-spec.patch
@@ -0,0 +1,12 @@
+diff -ur boto-2.49.0.orig/tests/unit/ec2/test_volume.py 
boto-2.49.0/tests/unit/ec2/test_volume.py
+--- boto-2.49.0.orig/tests/unit/ec2/test_volume.py     2022-11-02 
22:22:36.173725700 -0000
++++ boto-2.49.0/tests/unit/ec2/test_volume.py  2022-11-02 22:24:26.502590025 
-0000
+@@ -55,7 +55,7 @@
+     @mock.patch("boto.resultset.ResultSet")
+     def test_startElement_with_name_tagSet_calls_ResultSet(self, ResultSet, 
startElement):
+         startElement.return_value = None
+-        result_set = mock.Mock(ResultSet([("item", Tag)]))
++        result_set = ResultSet([("item", Tag)])
+         volume = Volume()
+         volume.tags = result_set
+         retval = volume.startElement("tagSet", None, None)

Reply via email to