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