Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/boto/, dev-python/boto/files/
Date: Wed, 02 Nov 2022 23:40:20
Message-Id: 1667432409.a7215e3fbc947086e89588c56bc43451580fa5d7.chutzpah@gentoo
1 commit: a7215e3fbc947086e89588c56bc43451580fa5d7
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 2 22:26:04 2022 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 2 23:40:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7215e3f
7
8 dev-python/boto: update EAPI 7 -> 8
9
10 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
11
12 dev-python/boto/boto-2.49.0-r5.ebuild | 63 +++++++++++++++++++++++
13 dev-python/boto/files/boto-2.49.0-mock-spec.patch | 12 +++++
14 2 files changed, 75 insertions(+)
15
16 diff --git a/dev-python/boto/boto-2.49.0-r5.ebuild b/dev-python/boto/boto-2.49.0-r5.ebuild
17 new file mode 100644
18 index 000000000000..565ac4250172
19 --- /dev/null
20 +++ b/dev-python/boto/boto-2.49.0-r5.ebuild
21 @@ -0,0 +1,63 @@
22 +# Copyright 1999-2022 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=8
26 +
27 +PYTHON_COMPAT=( python3_{8..11} )
28 +DISTUTILS_USE_PEP517=setuptools
29 +
30 +inherit distutils-r1
31 +
32 +DESCRIPTION="Amazon Web Services API"
33 +HOMEPAGE="https://github.com/boto/boto https://pypi.org/project/boto/"
34 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
35 +
36 +LICENSE="MIT"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
39 +
40 +PATCHES=(
41 + # taken from https://bugs.debian.org/909545
42 + "${FILESDIR}"/${P}-try-to-add-SNI-support-v3.patch
43 + "${FILESDIR}"/${P}-py38.patch
44 + "${FILESDIR}"/${P}-py3-socket-binary.patch
45 + "${FILESDIR}"/${P}-py3-httplib-strict.patch
46 + "${FILESDIR}"/${P}-py3-server-port.patch
47 + "${FILESDIR}"/${P}-unbundle-six.patch
48 + "${FILESDIR}"/${P}-py310.patch
49 + "${FILESDIR}"/${P}-mock-spec.patch
50 +)
51 +
52 +RDEPEND="
53 + >=dev-python/six-1.12.0[${PYTHON_USEDEP}]
54 +"
55 +
56 +BDEPEND="
57 + test? (
58 + dev-python/httpretty[${PYTHON_USEDEP}]
59 + dev-python/keyring[${PYTHON_USEDEP}]
60 + dev-python/lxml[${PYTHON_USEDEP}]
61 + dev-python/mock[${PYTHON_USEDEP}]
62 + dev-python/paramiko[${PYTHON_USEDEP}]
63 + dev-python/requests[${PYTHON_USEDEP}]
64 + dev-python/rsa[${PYTHON_USEDEP}]
65 + dev-python/selenium[${PYTHON_USEDEP}]
66 + )"
67 +
68 +distutils_enable_tests nose
69 +
70 +src_prepare() {
71 + # remove bundled libs.
72 + rm -f "${S}"/boto/vendored/six.py || die
73 + # broken, not worth fixing
74 + rm tests/unit/cloudfront/test_signed_urls.py || die
75 + # fix tests
76 + mkdir -p "${HOME}"/.ssh || die
77 + touch "${HOME}"/.ssh/known_hosts || die
78 +
79 + distutils-r1_src_prepare
80 +}
81 +
82 +python_test() {
83 + distutils-r1_python_test tests/unit
84 +}
85
86 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
87 new file mode 100644
88 index 000000000000..d8c8db2f1e9f
89 --- /dev/null
90 +++ b/dev-python/boto/files/boto-2.49.0-mock-spec.patch
91 @@ -0,0 +1,12 @@
92 +diff -ur boto-2.49.0.orig/tests/unit/ec2/test_volume.py boto-2.49.0/tests/unit/ec2/test_volume.py
93 +--- boto-2.49.0.orig/tests/unit/ec2/test_volume.py 2022-11-02 22:22:36.173725700 -0000
94 ++++ boto-2.49.0/tests/unit/ec2/test_volume.py 2022-11-02 22:24:26.502590025 -0000
95 +@@ -55,7 +55,7 @@
96 + @mock.patch("boto.resultset.ResultSet")
97 + def test_startElement_with_name_tagSet_calls_ResultSet(self, ResultSet, startElement):
98 + startElement.return_value = None
99 +- result_set = mock.Mock(ResultSet([("item", Tag)]))
100 ++ result_set = ResultSet([("item", Tag)])
101 + volume = Volume()
102 + volume.tags = result_set
103 + retval = volume.startElement("tagSet", None, None)