diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-07-14 23:57:36 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-07-14 23:57:36 +0200 |
commit | dceb74382de0d14e9cd4d7531f45e9022eeb83fb (patch) | |
tree | 7426b8167e86c15753534bee2aa83b6dc2417f76 /dev-python/stripe | |
parent | dev-python/testtools: Bump to 2.5.0 (diff) | |
download | gentoo-dceb74382de0d14e9cd4d7531f45e9022eeb83fb.tar.gz gentoo-dceb74382de0d14e9cd4d7531f45e9022eeb83fb.tar.bz2 gentoo-dceb74382de0d14e9cd4d7531f45e9022eeb83fb.zip |
dev-python/stripe: Bump to 2.60.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/stripe')
-rw-r--r-- | dev-python/stripe/Manifest | 1 | ||||
-rw-r--r-- | dev-python/stripe/stripe-2.60.0.ebuild | 62 |
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 782c3c6c2201..417b673f68f2 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,2 +1,3 @@ DIST stripe-2.58.0.tar.gz 216926 BLAKE2B 398b16ddab4050373ba5d7da3c8404b85b88d50749a5c3ce2e1704dbe04cdb99abc90b6c8837afbc3e086551e8dfa72baa3a5e68edf2ebb4e30aff157fb3ce8c SHA512 eee6154384fae69632e5e9ae7f972d97915b07da85c9f1af3849f5b9fea1e6f291c3d3e5b0e319c0d6dc0c035fec167f7711f650032016d3eb4709b333f3d5b7 DIST stripe-2.59.0.tar.gz 219952 BLAKE2B f59d7e7f7c03f620dd2f43b5678208d72de0f947bf748c9c41d6782a6b01450a0547ddd5972a731fd1b8187479e1b813f890993ae097ec8c32acd4691256a4c3 SHA512 f27ed8457d1097aac43aaddaf39b8d1d9df25e837160407edea354b2fa8faf122ed86a9d36583ff56885e22663b230ee63af04baab0edad2711f3c691c8de51c +DIST stripe-2.60.0.tar.gz 219649 BLAKE2B 208826e62560f6e9acb5016cecae4f3128106d562f8b5de6caa106179f6991376bacd679ab4cd61a973a60f68a84aebb673d17c1ca8d10541c2ab4a1e761da0e SHA512 eaae2356ed83285713be6396c071b8f5761ad0ff651691b1560b06bca190a5c5df3659182e5a25e8d286257046162f32755854f0e382a280cb63180478114502 diff --git a/dev-python/stripe/stripe-2.60.0.ebuild b/dev-python/stripe/stripe-2.60.0.ebuild new file mode 100644 index 000000000000..b8c67ae0502c --- /dev/null +++ b/dev-python/stripe/stripe-2.60.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} pypy3 ) +inherit distutils-r1 + +DESCRIPTION="Stripe python bindings" +HOMEPAGE="https://github.com/stripe/stripe-python" +SRC_URI="mirror://pypi/s/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + >=dev-python/requests-2.20[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + >=dev-util/stripe-mock-0.109.0 + dev-python/pytest-mock[${PYTHON_USEDEP}] + net-misc/curl + ) +" + +distutils_enable_tests pytest + +DOCS=(LONG_DESCRIPTION.rst CHANGELOG.md README.md) + +src_test() { + local stripe_mock_port=12111 + local stripe_mock_max_port=12121 + local stripe_mock_logfile="${T}/stripe_mock_${EPYTHON}.log" + # Try to start stripe-mock until we find a free port + while [[ "${stripe_mock_port}" -le "${stripe_mock_max_port}" ]]; do + ebegin "Trying to start stripe-mock on port ${stripe_mock_port}" + stripe-mock --http-port ${stripe_mock_port} &> "${stripe_mock_logfile}" & + local stripe_mock_pid=$! + sleep 2 + # Did stripe-mock start? + curl --fail -u "sk_test_123:" \ + http://127.0.0.1:${stripe_mock_port}/v1/customers &> /dev/null + eend $? "Port ${stripe_mock_port} unavailable" + if [[ $? -eq 0 ]]; then + einfo "stripe-mock running on port ${stripe_mock_port}" + break + fi + (( stripe_mock_port++ )) + done + if [[ "${stripe_mock_port}" -gt "${stripe_mock_max_port}" ]]; then + eerror "Unable to start stripe-mock for tests" + die "Please see the logfile located at: ${stripe_mock_logfile}" + fi + + local -x STRIPE_MOCK_PORT=${stripe_mock_port} + distutils-r1_src_test + + # Tear down stripe-mock + kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock" +} |