1 |
commit: ff8c2ff312145583d10249f3839a1d0ea7c7ca56 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 8 20:53:39 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 8 21:18:07 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff8c2ff3 |
7 |
|
8 |
dev-python/stripe: Bump to 2.71.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.71.0.ebuild | 68 ++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 69 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest |
17 |
index 39a672a23a21..80151106876e 100644 |
18 |
--- a/dev-python/stripe/Manifest |
19 |
+++ b/dev-python/stripe/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST stripe-2.66.0.tar.gz 234929 BLAKE2B 289c3464c3aa9ef5ebeccaffde383271ca23e704303d5b5499d1f5f1f197483088781d16878749bca03c8ea56209a22173c376ef00510f53d81c733f0a626af8 SHA512 d716e82580757ec0b187a74de1f8ef7bbe2f32468f13c551886bcbadf631eef001df9f4d249f091856b009545ca8b6d60f16c07e79345fee33651e7d27fb31c0 |
22 |
DIST stripe-2.67.0.tar.gz 235426 BLAKE2B ee396b0b7d3991afdd81e6b051fad0168a7b3dcfaddccc7700292878fc437788dcc40480fea2131dd52e3b787dc6e7b420d6023079f55d9365f76076cc51070d SHA512 099208259c6ca8d69fd6f39f72b9f12f41eace2f0a2a08b017f6141ad06882df742749941326fb8d9898db7c59e32ed74a464ad372d6f7f0a929c9ae4e4d2475 |
23 |
DIST stripe-2.70.0.tar.gz 239653 BLAKE2B d59d7b452e91169e83e4d4bc10b544fc94c48aa3a967c899136b1b9ea60e835d998c1a5a0c5e131989d9628c36b77e3fe133952dddbede69d0bcfa11dc9fc640 SHA512 62f40d82e4a5d37ce070a2457b8372d903993e209f6a042ab97a93f5ee98eb994c0cac070451e2b130df9a72f4a9ece65600266735b438aff3cc5cf09e217b27 |
24 |
+DIST stripe-2.71.0.tar.gz 239817 BLAKE2B c1b8fad45e7e9fee79f841502aaad1a849f345357d2facfab833bc50129c5d9eac6c2af128ef572f9d295da966b8a38b095786b44bf026eac6f6d001470ae60a SHA512 5acbaba1e2a5e063beafd0b67994a4a4c7d207f220a49e84b7ab3c0288a92150fd10048f7782e32c3033f4a920f5e81a0893610545e5d1f49ee6dbe62aa4b3a5 |
25 |
|
26 |
diff --git a/dev-python/stripe/stripe-2.71.0.ebuild b/dev-python/stripe/stripe-2.71.0.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..b88af4c76c63 |
29 |
--- /dev/null |
30 |
+++ b/dev-python/stripe/stripe-2.71.0.ebuild |
31 |
@@ -0,0 +1,68 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+DISTUTILS_USE_PEP517=setuptools |
38 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
39 |
+ |
40 |
+inherit distutils-r1 |
41 |
+ |
42 |
+DESCRIPTION="Stripe python bindings" |
43 |
+HOMEPAGE="https://github.com/stripe/stripe-python" |
44 |
+SRC_URI="mirror://pypi/s/${PN}/${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="MIT" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64 ~x86" |
49 |
+ |
50 |
+RDEPEND=" |
51 |
+ >=dev-python/requests-2.20[${PYTHON_USEDEP}] |
52 |
+" |
53 |
+BDEPEND=" |
54 |
+ test? ( |
55 |
+ >=dev-util/stripe-mock-0.122.0 |
56 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
57 |
+ net-misc/curl |
58 |
+ ) |
59 |
+" |
60 |
+ |
61 |
+distutils_enable_tests pytest |
62 |
+ |
63 |
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md ) |
64 |
+ |
65 |
+python_test() { |
66 |
+ epytest tests |
67 |
+} |
68 |
+ |
69 |
+src_test() { |
70 |
+ local stripe_mock_port=12111 |
71 |
+ local stripe_mock_max_port=12121 |
72 |
+ local stripe_mock_logfile="${T}/stripe_mock_${EPYTHON}.log" |
73 |
+ # Try to start stripe-mock until we find a free port |
74 |
+ while [[ "${stripe_mock_port}" -le "${stripe_mock_max_port}" ]]; do |
75 |
+ ebegin "Trying to start stripe-mock on port ${stripe_mock_port}" |
76 |
+ stripe-mock --http-port ${stripe_mock_port} &> "${stripe_mock_logfile}" & |
77 |
+ local stripe_mock_pid=$! |
78 |
+ sleep 2 |
79 |
+ # Did stripe-mock start? |
80 |
+ curl --fail -u "sk_test_123:" \ |
81 |
+ http://127.0.0.1:${stripe_mock_port}/v1/customers &> /dev/null |
82 |
+ eend $? "Port ${stripe_mock_port} unavailable" |
83 |
+ if [[ $? -eq 0 ]]; then |
84 |
+ einfo "stripe-mock running on port ${stripe_mock_port}" |
85 |
+ break |
86 |
+ fi |
87 |
+ (( stripe_mock_port++ )) |
88 |
+ done |
89 |
+ if [[ "${stripe_mock_port}" -gt "${stripe_mock_max_port}" ]]; then |
90 |
+ eerror "Unable to start stripe-mock for tests" |
91 |
+ die "Please see the logfile located at: ${stripe_mock_logfile}" |
92 |
+ fi |
93 |
+ |
94 |
+ local -x STRIPE_MOCK_PORT=${stripe_mock_port} |
95 |
+ distutils-r1_src_test |
96 |
+ |
97 |
+ # Tear down stripe-mock |
98 |
+ kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock" |
99 |
+} |