1 |
commit: 57aab8fd470a962e97ac759d3f645146b3aba9e3 |
2 |
Author: Cédric Krier <cedk <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 14 12:37:29 2019 +0000 |
4 |
Commit: Cédric Krier <cedk <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 14 12:37:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57aab8fd |
7 |
|
8 |
dev-python/stripe: Version bumps |
9 |
|
10 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
11 |
Signed-off-by: Cédric Krier <cedk <AT> gentoo.org> |
12 |
|
13 |
dev-python/stripe/Manifest | 1 + |
14 |
dev-python/stripe/stripe-2.34.0.ebuild | 69 ++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 70 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest |
18 |
index cd559ceb5e9..847e343e64f 100644 |
19 |
--- a/dev-python/stripe/Manifest |
20 |
+++ b/dev-python/stripe/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST stripe-1.84.2.tar.gz 213050 BLAKE2B df6c195a183d15bdeb7ffbfd2f5683b0b667e8a4df7a637d3960369e1b00a90c74bb5d97af64c553e2f250b2bb7bb698d015a65c3da312f74bc7b141c4b63dc5 SHA512 7d3e1a20c30b3c2fa087c9fe86b04462db4b6cd742ea13daae2754ee6b414656847057b30db48634c6d02ef01d8e510359505fab212325a3db36dfaf2d72db38 |
23 |
DIST stripe-2.10.1.tar.gz 218299 BLAKE2B b1d836ef92dabfd5a5f292ede69264886dadb0b87b72927e444d615e9f0518efff513f34f2aaee778921f7cb68169f7981a5e84993b19221ec394a1d5c07c622 SHA512 877a87e848d425f333ad3e40c172010a3b1882de0894ff8c5c0623f5d09fbd7ab51d9d53ead8773d3680cdab8d07df32f4210abc08c796adf6feeb4014b671f7 |
24 |
DIST stripe-2.3.0.tar.gz 213813 BLAKE2B b383c724331d5ec21452aee2eee49c789e2503057c4648d9e879fc561b87cc70ba918bb1e620db3bca380150e62d41433f1bfa7f9b6f164731d3d68542d5f056 SHA512 ba88b18b7328d917379d8474373a1f87717d67cf305022b80eb05c74b8055b825cf30cc879c4e99dbe06dc99f03464649e637d83d70c902b84f5873dd0776453 |
25 |
+DIST stripe-2.34.0.tar.gz 206926 BLAKE2B 30a4d3da4ad58ffb8656c03d1755e20afd7059cf23a693e59af467720e88769f64e53bf62b06c493f7713c50bc251f475501d37045ed0db1df99c9fad72f51eb SHA512 e9bde04ffcd7bfd36afa1a32a9f9bf3454cc262ec2b760bc606aa6b24f8b0d8d0fa37309fc5472ba88dc63f1384c03fc451d2b6a6007728a8ec9fd0899b8b717 |
26 |
|
27 |
diff --git a/dev-python/stripe/stripe-2.34.0.ebuild b/dev-python/stripe/stripe-2.34.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..6c3d8ebe9fb |
30 |
--- /dev/null |
31 |
+++ b/dev-python/stripe/stripe-2.34.0.ebuild |
32 |
@@ -0,0 +1,69 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} ) |
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 |
+IUSE="test" |
49 |
+ |
50 |
+RDEPEND=" |
51 |
+ $(python_gen_cond_dep '>=dev-python/requests-2.20[${PYTHON_USEDEP}]' 'python3*' pypy3) |
52 |
+ $(python_gen_cond_dep '>=dev-python/requests-2.20[ssl,${PYTHON_USEDEP}]' 'python2*' pypy) |
53 |
+" |
54 |
+# See https://github.com/stripe/stripe-python/blob/v2.10.1/tests/conftest.py#L17 |
55 |
+# for minimum required version of stripe-mock |
56 |
+# Running the tests against dev-util/stripe-mock-0.47.0 resulted in test errors |
57 |
+DEPEND="${RDEPEND} |
58 |
+ test? ( |
59 |
+ >=dev-util/stripe-mock-0.63.0 |
60 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
61 |
+ dev-python/pytest-mock[${PYTHON_USEDEP}] |
62 |
+ net-misc/curl |
63 |
+ ) |
64 |
+" |
65 |
+ |
66 |
+DOCS=(LONG_DESCRIPTION.rst CHANGELOG.md README.md) |
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 |
+ distutils-r1_src_test |
94 |
+ |
95 |
+ # Tear down stripe-mock |
96 |
+ kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock" |
97 |
+} |
98 |
+ |
99 |
+python_test() { |
100 |
+ STRIPE_MOCK_PORT=${stripe_mock_port} pytest -vv || die "Tests failed with ${EPYTHON}" |
101 |
+} |