1 |
commit: f86d7051d18b7c785972d9cb71d4073be2353054 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 21 20:16:36 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 21 20:32:49 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f86d7051 |
7 |
|
8 |
dev-python/stripe: add 2.64.0 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
dev-python/stripe/Manifest | 1 + |
13 |
dev-python/stripe/stripe-2.64.0.ebuild | 60 ++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 61 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest |
17 |
index 1f8602b96967..1757da7efd80 100644 |
18 |
--- a/dev-python/stripe/Manifest |
19 |
+++ b/dev-python/stripe/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST stripe-2.63.0.tar.gz 233693 BLAKE2B 18de5e0a74b241759a7c84203e675159958a77e3ee225ebdfd5ed2d2d633a3b91f5165ac14a164b09e4df81176aafe1727685c4156b5055dc4ea2a44b0af9134 SHA512 fedef25d95e1fe3f9b4fdab37fb4ababc3c0243218da590076942491884b284b07e6bb15e9c85a6871dabffc34c260ec9d9fb80634ab0a368cf312c2324c2bdd |
22 |
+DIST stripe-2.64.0.tar.gz 234442 BLAKE2B 504e32c19f1a65a39ee709d3abc7211d648c7aaf8493edb4130d49d3fbbebea4ec7d2c116b9b715e9e0d5d383578c477ae0e2cbace51f5b8574d540e9b9238d8 SHA512 5055b5a712c0891f3660d00fe7bb27452cce33aa4a9c70fbd7391dd989d31aeb8d8288c3cdd22747b6fd4c480be17f7ab9428c31ea7d2c674e175e77f4f6a0b7 |
23 |
|
24 |
diff --git a/dev-python/stripe/stripe-2.64.0.ebuild b/dev-python/stripe/stripe-2.64.0.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..763c4b00fd68 |
27 |
--- /dev/null |
28 |
+++ b/dev-python/stripe/stripe-2.64.0.ebuild |
29 |
@@ -0,0 +1,60 @@ |
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=">=dev-python/requests-2.20[${PYTHON_USEDEP}]" |
47 |
+BDEPEND=" |
48 |
+ test? ( |
49 |
+ >=dev-util/stripe-mock-0.115.0 |
50 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
51 |
+ net-misc/curl |
52 |
+ ) |
53 |
+" |
54 |
+ |
55 |
+distutils_enable_tests pytest |
56 |
+ |
57 |
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md ) |
58 |
+ |
59 |
+src_test() { |
60 |
+ local stripe_mock_port=12111 |
61 |
+ local stripe_mock_max_port=12121 |
62 |
+ local stripe_mock_logfile="${T}/stripe_mock_${EPYTHON}.log" |
63 |
+ # Try to start stripe-mock until we find a free port |
64 |
+ while [[ "${stripe_mock_port}" -le "${stripe_mock_max_port}" ]]; do |
65 |
+ ebegin "Trying to start stripe-mock on port ${stripe_mock_port}" |
66 |
+ stripe-mock --http-port ${stripe_mock_port} &> "${stripe_mock_logfile}" & |
67 |
+ local stripe_mock_pid=$! |
68 |
+ sleep 2 |
69 |
+ # Did stripe-mock start? |
70 |
+ curl --fail -u "sk_test_123:" \ |
71 |
+ http://127.0.0.1:${stripe_mock_port}/v1/customers &> /dev/null |
72 |
+ eend $? "Port ${stripe_mock_port} unavailable" |
73 |
+ if [[ $? -eq 0 ]]; then |
74 |
+ einfo "stripe-mock running on port ${stripe_mock_port}" |
75 |
+ break |
76 |
+ fi |
77 |
+ (( stripe_mock_port++ )) |
78 |
+ done |
79 |
+ if [[ "${stripe_mock_port}" -gt "${stripe_mock_max_port}" ]]; then |
80 |
+ eerror "Unable to start stripe-mock for tests" |
81 |
+ die "Please see the logfile located at: ${stripe_mock_logfile}" |
82 |
+ fi |
83 |
+ |
84 |
+ local -x STRIPE_MOCK_PORT=${stripe_mock_port} |
85 |
+ distutils-r1_src_test |
86 |
+ |
87 |
+ # Tear down stripe-mock |
88 |
+ kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock" |
89 |
+} |