diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-06-18 06:36:49 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-06-18 08:47:06 +0200 |
commit | 5bb34fb7d161128ed58bbc54f196ce5ccf98870c (patch) | |
tree | 3adad58717b178c56d33cd3fbc01045f00bfa8cb /dev-python/stripe | |
parent | dev-util/stripe-mock: Bump to 0.135.0 (diff) | |
download | gentoo-5bb34fb7d161128ed58bbc54f196ce5ccf98870c.tar.gz gentoo-5bb34fb7d161128ed58bbc54f196ce5ccf98870c.tar.bz2 gentoo-5bb34fb7d161128ed58bbc54f196ce5ccf98870c.zip |
dev-python/stripe: Bump to 3.4.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-3.4.0.ebuild | 71 |
2 files changed, 72 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 68decf98053f..62a6f70d9041 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,2 +1,3 @@ DIST stripe-3.2.0.tar.gz 245873 BLAKE2B c75864cebc4b62c116138bb3b9fcc7b521a7c89c7252bb2ad03520b0904ad701bab27fbe1a0ae500a2782bf737295218180991fe0d5f224038f7bdcfd2596598 SHA512 dbeb846294928fd608d547b8e4aedf188345ce68ce6e9b4c046e86e5a622d96281cf0507db4d1ba5834c68252bda573da7dac725aa1d7cbeb820c65e166f3a1a DIST stripe-3.3.0.tar.gz 246317 BLAKE2B f734df83509b6c77f865d52b2ec17ac5ac271661478706787616afde1f85cb356f05c2fff63289b3bb180658abab546d39245563f18f4f7a3e8b72a0e578fb34 SHA512 4f00fd9901a5b4d873c4a9a00483f57f4cd9359f8a440b3d783e7aeed250e33400a7405ca8ea5af29fd1b44bc84c65fa59c8121e4ffb4852584ffd3fc2099910 +DIST stripe-3.4.0.tar.gz 246528 BLAKE2B 81af648356734400c109d674e1f62f45c3b0540b0ed0bd94e407f5072f5bb996270b4edf12bd00e61bb790ee2c12d3d0fa633287a60e27087e64c15aa421650a SHA512 81a391b2fef02028a5680df2240238bd18cc31f522790ee72fd77c861d2f389be3ead9bc1de261ac7bced3061235ffc25b6baadb69a20a2a53ced75aee0119ba diff --git a/dev-python/stripe/stripe-3.4.0.ebuild b/dev-python/stripe/stripe-3.4.0.ebuild new file mode 100644 index 000000000000..cce5111d957a --- /dev/null +++ b/dev-python/stripe/stripe-3.4.0.ebuild @@ -0,0 +1,71 @@ +# 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..11} pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Stripe python bindings" +HOMEPAGE=" + https://github.com/stripe/stripe-python/ + https://pypi.org/project/stripe/ +" +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.135.0 + dev-python/pytest-mock[${PYTHON_USEDEP}] + net-misc/curl + ) +" + +distutils_enable_tests pytest + +DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md ) + +python_test() { + epytest tests +} + +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" +} |