summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-11-01 05:39:12 +0100
committerMichał Górny <mgorny@gentoo.org>2023-11-01 05:43:51 +0100
commit945179f85104386bd19f9918a66a1673bd922ea3 (patch)
treecaff9a04f2579f279f1245270a898b5dafd77ad3 /dev-python/stripe
parentdev-python/matplotlib: Bump to 3.8.1 (diff)
downloadgentoo-945179f85104386bd19f9918a66a1673bd922ea3.tar.gz
gentoo-945179f85104386bd19f9918a66a1673bd922ea3.tar.bz2
gentoo-945179f85104386bd19f9918a66a1673bd922ea3.zip
dev-python/stripe: Bump to 7.2.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/stripe')
-rw-r--r--dev-python/stripe/Manifest1
-rw-r--r--dev-python/stripe/stripe-7.2.0.ebuild73
2 files changed, 74 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 0eafe3267357..cbca749d590e 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,3 +1,4 @@
DIST stripe-6.7.0.tar.gz 293207 BLAKE2B 5c07b6f04aa72045cccb4422b1f163cf6351f100d2245a4f93952d641ed8e4735c964b850179906bc7af13730724f596cd2cfa85c3d8fb8792f6a4e561337b0a SHA512 778c3ffa177e52b62bf4821b2f0aaa5eef01d8690526c42015d192bb06332a2a5fd143c8dab82497803adcfed963b7ccf06dc77908b21a7a7c77f9ef39b39c12
DIST stripe-7.0.0.tar.gz 378521 BLAKE2B a53248162b44776f0c457064c3d2d99e7f6ec8561d1a88ee7bec655d20ff9dada3c92d7d764b3775950902a908f1d9d82c0002483cd168646f1cbde19640ca92 SHA512 154a772880522e5567907c3c9c6024f18ee1e81b4e192f30dbe8ea4b0fa3d1cf4b04d9de7ab9f0911e2a3d9c5f65207fd4d499b4e5ea3c606c738506d2eb15d5
DIST stripe-7.1.0.tar.gz 737411 BLAKE2B 9db3d016e0a4180b377b9a7e4251f622ff62f2fd29e8fa6680941e4ce4b8585f675ab46eb46ba02b3f7e07679f048a3b6429a7ca0ebdb23ef41cd159111e6ca1 SHA512 240e0e0ba275e255e64d91036dc6489c60079d1ae031135b3fbb7f0db1aa12bf7251a303dfd56e1eac45bb0c667d76b64f4866b558ac3b78ccc0b9ebb8016bff
+DIST stripe-7.2.0.tar.gz 738081 BLAKE2B 9d46139f989b9c5d50989ab21bc4c4d2f825b1bbba08d23e1826646c30beb1e8f04385fda200921cb08f0af4146e64f26e0f880cd1ac1d83404b4c743f62b07d SHA512 93aa2762b41c0d2e277a50609c58c7e7f7aedc2c000bb6951d252279bd1568bd4a459769d631b0473f1d7b6f82f50adbf53781c5d9126124426ba7a287638860
diff --git a/dev-python/stripe/stripe-7.2.0.ebuild b/dev-python/stripe/stripe-7.2.0.ebuild
new file mode 100644
index 000000000000..1b1e683365bd
--- /dev/null
+++ b/dev-python/stripe/stripe-7.2.0.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Stripe python bindings"
+HOMEPAGE="
+ https://github.com/stripe/stripe-python/
+ https://pypi.org/project/stripe/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=dev-python/requests-2.20[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.5.0[${PYTHON_USEDEP}]
+"
+# please bump dev-util/stripe-mock dep to the latest version on every bump
+BDEPEND="
+ test? (
+ >=dev-util/stripe-mock-0.177.0
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ net-misc/curl
+ )
+"
+
+distutils_enable_tests pytest
+
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md )
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest tests -p pytest_mock
+}
+
+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"
+}