Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/stripe/
Date: Tue, 12 Oct 2021 06:18:19
Message-Id: 1634019488.4ae003aa8f43d2d29d90a29baa6700f0feb0ea3f.mgorny@gentoo
1 commit: 4ae003aa8f43d2d29d90a29baa6700f0feb0ea3f
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 12 06:09:57 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 12 06:18:08 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ae003aa
7
8 dev-python/stripe: Bump to 2.61.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/stripe/Manifest | 1 +
13 dev-python/stripe/stripe-2.61.0.ebuild | 62 ++++++++++++++++++++++++++++++++++
14 2 files changed, 63 insertions(+)
15
16 diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
17 index 56e1d04b9ae..ff8d9312518 100644
18 --- a/dev-python/stripe/Manifest
19 +++ b/dev-python/stripe/Manifest
20 @@ -1 +1,2 @@
21 DIST stripe-2.60.0.tar.gz 219649 BLAKE2B 208826e62560f6e9acb5016cecae4f3128106d562f8b5de6caa106179f6991376bacd679ab4cd61a973a60f68a84aebb673d17c1ca8d10541c2ab4a1e761da0e SHA512 eaae2356ed83285713be6396c071b8f5761ad0ff651691b1560b06bca190a5c5df3659182e5a25e8d286257046162f32755854f0e382a280cb63180478114502
22 +DIST stripe-2.61.0.tar.gz 231302 BLAKE2B e971c3393e255d09eb84bcdf24b5eb32ca42d7d04332cc6fac7685606164c1b95f2b5bffeadb39f11be8c50360da03feca2dce1b4f5f84a3a95cfe4458ff1970 SHA512 5b331d862ea832a821a9dff9bb7569aa2b94726c2d36ec5f304a5a41b3fcdda1096f85f444500f0826fd3e349c47b5ef18ab91b8ec5cb67d966346a0cbd1a7ef
23
24 diff --git a/dev-python/stripe/stripe-2.61.0.ebuild b/dev-python/stripe/stripe-2.61.0.ebuild
25 new file mode 100644
26 index 00000000000..09067807960
27 --- /dev/null
28 +++ b/dev-python/stripe/stripe-2.61.0.ebuild
29 @@ -0,0 +1,62 @@
30 +# Copyright 1999-2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
36 +inherit distutils-r1
37 +
38 +DESCRIPTION="Stripe python bindings"
39 +HOMEPAGE="https://github.com/stripe/stripe-python"
40 +SRC_URI="mirror://pypi/s/${PN}/${P}.tar.gz"
41 +
42 +LICENSE="MIT"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~x86"
45 +
46 +RDEPEND="
47 + >=dev-python/requests-2.20[${PYTHON_USEDEP}]
48 +"
49 +BDEPEND="
50 + test? (
51 + >=dev-util/stripe-mock-0.112.0
52 + dev-python/pytest-mock[${PYTHON_USEDEP}]
53 + net-misc/curl
54 + )
55 +"
56 +
57 +distutils_enable_tests pytest
58 +
59 +DOCS=(LONG_DESCRIPTION.rst CHANGELOG.md README.md)
60 +
61 +src_test() {
62 + local stripe_mock_port=12111
63 + local stripe_mock_max_port=12121
64 + local stripe_mock_logfile="${T}/stripe_mock_${EPYTHON}.log"
65 + # Try to start stripe-mock until we find a free port
66 + while [[ "${stripe_mock_port}" -le "${stripe_mock_max_port}" ]]; do
67 + ebegin "Trying to start stripe-mock on port ${stripe_mock_port}"
68 + stripe-mock --http-port ${stripe_mock_port} &> "${stripe_mock_logfile}" &
69 + local stripe_mock_pid=$!
70 + sleep 2
71 + # Did stripe-mock start?
72 + curl --fail -u "sk_test_123:" \
73 + http://127.0.0.1:${stripe_mock_port}/v1/customers &> /dev/null
74 + eend $? "Port ${stripe_mock_port} unavailable"
75 + if [[ $? -eq 0 ]]; then
76 + einfo "stripe-mock running on port ${stripe_mock_port}"
77 + break
78 + fi
79 + (( stripe_mock_port++ ))
80 + done
81 + if [[ "${stripe_mock_port}" -gt "${stripe_mock_max_port}" ]]; then
82 + eerror "Unable to start stripe-mock for tests"
83 + die "Please see the logfile located at: ${stripe_mock_logfile}"
84 + fi
85 +
86 + local -x STRIPE_MOCK_PORT=${stripe_mock_port}
87 + distutils-r1_src_test
88 +
89 + # Tear down stripe-mock
90 + kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock"
91 +}