1 |
commit: 7ad2de5bc3b55a4f25805dcf175154723b79d5f8 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 1 04:13:46 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 1 06:53:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ad2de5b |
7 |
|
8 |
dev-python/stripe: Bump to 3.5.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-3.5.0.ebuild | 71 +++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 72 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest |
17 |
index 62a6f70d9041..6acc57051daf 100644 |
18 |
--- a/dev-python/stripe/Manifest |
19 |
+++ b/dev-python/stripe/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST stripe-3.2.0.tar.gz 245873 BLAKE2B c75864cebc4b62c116138bb3b9fcc7b521a7c89c7252bb2ad03520b0904ad701bab27fbe1a0ae500a2782bf737295218180991fe0d5f224038f7bdcfd2596598 SHA512 dbeb846294928fd608d547b8e4aedf188345ce68ce6e9b4c046e86e5a622d96281cf0507db4d1ba5834c68252bda573da7dac725aa1d7cbeb820c65e166f3a1a |
22 |
DIST stripe-3.3.0.tar.gz 246317 BLAKE2B f734df83509b6c77f865d52b2ec17ac5ac271661478706787616afde1f85cb356f05c2fff63289b3bb180658abab546d39245563f18f4f7a3e8b72a0e578fb34 SHA512 4f00fd9901a5b4d873c4a9a00483f57f4cd9359f8a440b3d783e7aeed250e33400a7405ca8ea5af29fd1b44bc84c65fa59c8121e4ffb4852584ffd3fc2099910 |
23 |
DIST stripe-3.4.0.tar.gz 246528 BLAKE2B 81af648356734400c109d674e1f62f45c3b0540b0ed0bd94e407f5072f5bb996270b4edf12bd00e61bb790ee2c12d3d0fa633287a60e27087e64c15aa421650a SHA512 81a391b2fef02028a5680df2240238bd18cc31f522790ee72fd77c861d2f389be3ead9bc1de261ac7bced3061235ffc25b6baadb69a20a2a53ced75aee0119ba |
24 |
+DIST stripe-3.5.0.tar.gz 247698 BLAKE2B 8c47b3f4af21934d4dddea2d95831d5d4772c0cf42f8a5d3cff90dbd2dfd51a37c34f92b6df30ddcafbb1ccbde766744ec63fe62881acabbf1437a626ec0ef6c SHA512 67e63f95b489e049d81d9b3929342a8cc2bc3638060d9f278752459d32408bfe8d5f09c4c047a1ed0deedce875b0a84873a3b120f6bb5f30c0668eda5129e4ee |
25 |
|
26 |
diff --git a/dev-python/stripe/stripe-3.5.0.ebuild b/dev-python/stripe/stripe-3.5.0.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..52c5023ff5ec |
29 |
--- /dev/null |
30 |
+++ b/dev-python/stripe/stripe-3.5.0.ebuild |
31 |
@@ -0,0 +1,71 @@ |
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..11} pypy3 ) |
39 |
+ |
40 |
+inherit distutils-r1 |
41 |
+ |
42 |
+DESCRIPTION="Stripe python bindings" |
43 |
+HOMEPAGE=" |
44 |
+ https://github.com/stripe/stripe-python/ |
45 |
+ https://pypi.org/project/stripe/ |
46 |
+" |
47 |
+SRC_URI="mirror://pypi/s/${PN}/${P}.tar.gz" |
48 |
+ |
49 |
+LICENSE="MIT" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~amd64 ~x86" |
52 |
+ |
53 |
+RDEPEND=" |
54 |
+ >=dev-python/requests-2.20[${PYTHON_USEDEP}] |
55 |
+" |
56 |
+BDEPEND=" |
57 |
+ test? ( |
58 |
+ >=dev-util/stripe-mock-0.136.0 |
59 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
60 |
+ net-misc/curl |
61 |
+ ) |
62 |
+" |
63 |
+ |
64 |
+distutils_enable_tests pytest |
65 |
+ |
66 |
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md ) |
67 |
+ |
68 |
+python_test() { |
69 |
+ epytest tests |
70 |
+} |
71 |
+ |
72 |
+src_test() { |
73 |
+ local stripe_mock_port=12111 |
74 |
+ local stripe_mock_max_port=12121 |
75 |
+ local stripe_mock_logfile="${T}/stripe_mock_${EPYTHON}.log" |
76 |
+ # Try to start stripe-mock until we find a free port |
77 |
+ while [[ "${stripe_mock_port}" -le "${stripe_mock_max_port}" ]]; do |
78 |
+ ebegin "Trying to start stripe-mock on port ${stripe_mock_port}" |
79 |
+ stripe-mock --http-port ${stripe_mock_port} &> "${stripe_mock_logfile}" & |
80 |
+ local stripe_mock_pid=$! |
81 |
+ sleep 2 |
82 |
+ # Did stripe-mock start? |
83 |
+ curl --fail -u "sk_test_123:" \ |
84 |
+ http://127.0.0.1:${stripe_mock_port}/v1/customers &> /dev/null |
85 |
+ eend $? "Port ${stripe_mock_port} unavailable" |
86 |
+ if [[ $? -eq 0 ]]; then |
87 |
+ einfo "stripe-mock running on port ${stripe_mock_port}" |
88 |
+ break |
89 |
+ fi |
90 |
+ (( stripe_mock_port++ )) |
91 |
+ done |
92 |
+ if [[ "${stripe_mock_port}" -gt "${stripe_mock_max_port}" ]]; then |
93 |
+ eerror "Unable to start stripe-mock for tests" |
94 |
+ die "Please see the logfile located at: ${stripe_mock_logfile}" |
95 |
+ fi |
96 |
+ |
97 |
+ local -x STRIPE_MOCK_PORT=${stripe_mock_port} |
98 |
+ distutils-r1_src_test |
99 |
+ |
100 |
+ # Tear down stripe-mock |
101 |
+ kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock" |
102 |
+} |