diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-03-16 10:32:52 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-03-16 10:54:42 +0100 |
commit | 9a29db951c6c6f8e0481fed0ba7fb148fb92b659 (patch) | |
tree | d793c3c420b32b1ef6c2fc76c3191b4b91697550 /dev-python/stripe | |
parent | dev-util/stripe-mock: Bump to 0.119.0 (diff) | |
download | gentoo-9a29db951c6c6f8e0481fed0ba7fb148fb92b659.tar.gz gentoo-9a29db951c6c6f8e0481fed0ba7fb148fb92b659.tar.bz2 gentoo-9a29db951c6c6f8e0481fed0ba7fb148fb92b659.zip |
dev-python/stripe: Bump to 2.67.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.67.0.ebuild | 62 |
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index a9f0f2b0e50e..9509b61905aa 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1 +1,2 @@ DIST stripe-2.66.0.tar.gz 234929 BLAKE2B 289c3464c3aa9ef5ebeccaffde383271ca23e704303d5b5499d1f5f1f197483088781d16878749bca03c8ea56209a22173c376ef00510f53d81c733f0a626af8 SHA512 d716e82580757ec0b187a74de1f8ef7bbe2f32468f13c551886bcbadf631eef001df9f4d249f091856b009545ca8b6d60f16c07e79345fee33651e7d27fb31c0 +DIST stripe-2.67.0.tar.gz 235426 BLAKE2B ee396b0b7d3991afdd81e6b051fad0168a7b3dcfaddccc7700292878fc437788dcc40480fea2131dd52e3b787dc6e7b420d6023079f55d9365f76076cc51070d SHA512 099208259c6ca8d69fd6f39f72b9f12f41eace2f0a2a08b017f6141ad06882df742749941326fb8d9898db7c59e32ed74a464ad372d6f7f0a929c9ae4e4d2475 diff --git a/dev-python/stripe/stripe-2.67.0.ebuild b/dev-python/stripe/stripe-2.67.0.ebuild new file mode 100644 index 000000000000..9404b589fe32 --- /dev/null +++ b/dev-python/stripe/stripe-2.67.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +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.119.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" +} |