summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-01-26 06:10:12 +0100
committerMichał Górny <mgorny@gentoo.org>2024-01-26 06:39:12 +0100
commitfb6d13521ecccfd8e0aa2e05848c327583c12072 (patch)
tree8a55c31ae2c94ac44b7825b704123c8fb7a404f2 /dev-python/stripe
parentdev-python/beartype: Bump to 0.17.0 (diff)
downloadgentoo-fb6d13521ecccfd8e0aa2e05848c327583c12072.tar.gz
gentoo-fb6d13521ecccfd8e0aa2e05848c327583c12072.tar.bz2
gentoo-fb6d13521ecccfd8e0aa2e05848c327583c12072.zip
dev-python/stripe: Bump to 7.14.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.14.0.ebuild81
2 files changed, 82 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 99e7e8536866..c81e52ed8ea6 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,3 +1,4 @@
DIST stripe-7.11.0.tar.gz 783456 BLAKE2B 9317526b9c19d98b921f3fa8222486537b3bfa3a9c239d83098be1d9856a258a67276690c1f1ced6087a8d7f1fb180240f737d67f9ded5605e82de7fc4355fc0 SHA512 5cfa650d43745c8a3ab5588f30c6eaab0952aff060b9fdb84027db3422c88002d074eb29b3e2a40ed1457be6e8cd883b3323e8da538af0991114a10976b86842
DIST stripe-7.12.0.tar.gz 783948 BLAKE2B 063df7bbc118847bdee35f2919bd8023f4d58b5f1a36ad9d81dd63b6771513e3323a50ce8f83bb1719d6a44e6e823384a908af9b2091fb7c27a7bf78e5e22b40 SHA512 819aa9f4ec1d7269d14d43abd2c4ec7b20b76bdd4f290962ac51b89926ab2e1f1644dd9c653556673b7a65e97510e6d588052fcc4a7e3c05464a0564bb8d8ed0
DIST stripe-7.13.0.tar.gz 789362 BLAKE2B 326a8b0987ffc7b9bcca2c3fbff548770223a6e153ac4b04fdfe70c400ce0b7d06d40182727ca2fc0ab700f57133481510aec9432c6582dec2a34eba57e682fe SHA512 0ed4d7d1781236f8e6bb3685680f59cf9c3bdf8645e0f5cd17753d079e42965660666ec76cb65ee6d4145514706fd39f6c0f1af331033d0eb3f47f8445082be7
+DIST stripe-7.14.0.tar.gz 793052 BLAKE2B fa0cf2c57a1cc6ab2eccfa5c1882e2b0ef62d3d92b392ab23df495c93dad52b43e609c1938af4403a3d1c87d9d73b08a9536d01ca5a7f98a5caebcbaf894d5be SHA512 c40b1a3a4c5af132b30402e9f3860fd2e463e2ca263bc4a072975a744a86e3659c9499cab2ed8f10dd076bb896c2ae4d8a79d8307e2307b598ebe24728a81025
diff --git a/dev-python/stripe/stripe-7.14.0.ebuild b/dev-python/stripe/stripe-7.14.0.ebuild
new file mode 100644
index 000000000000..e5d81167c1c1
--- /dev/null
+++ b/dev-python/stripe/stripe-7.14.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2024 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 ~arm64 ~x86"
+IUSE="telemetry"
+
+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.180.0
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ net-misc/curl
+ )
+"
+
+distutils_enable_tests pytest
+
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md )
+
+src_prepare() {
+ if ! use telemetry; then
+ sed -i -e '/enable_telemetry/s:True:False:' stripe/__init__.py || die
+ fi
+ distutils-r1_src_prepare
+}
+
+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"
+}