summaryrefslogtreecommitdiff
path: root/dev-python/stripe
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/stripe')
-rw-r--r--dev-python/stripe/Manifest2
-rw-r--r--dev-python/stripe/stripe-11.6.0.ebuild95
2 files changed, 97 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 10a15ba1a95e..9b9d47b853e4 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,3 +1,5 @@
DIST stripe-11.5.0.tar.gz 1386601 BLAKE2B 009cd3d273a009d20ec46f7d1875212cdee92514f9735a8474eba321d92f2fed9d55ea946feecf1aaf0e456dd76c5cd651eccaad8c68838575e7655940b75e5b SHA512 2f18732d59b92b9d17f4f3b728c8457dc10457d7a2c53d80ff1f770c09f77b7d7d1627ce51f4bd37432bc41b1aab5377eecc0adaa735a6b3f45f2193e0acf4fb
+DIST stripe-11.6.0.tar.gz 1390405 BLAKE2B 0a630201e0c85d1c456a02f18c1383d8367e8980485cf20ab62fbad2a6a6f0612b2199626de1e7f5cefb477e7dcc07777d2af095994de04805fcba206469f6cd SHA512 f92978feef4083cb1a662da44101b9b670d442c141921f29b93a551a36d641faccdff60499115a4b8a0c62b74498403ad3ac7f04c4b16992f3cab5ee498cb25d
EBUILD stripe-11.5.0.ebuild 2534 BLAKE2B 5680547d4482f194dd0f21160b834c2d9748e1bba60fa39d1e159563e4dd99da8e9a4f8bc43ee1556839617a17611197c5885073c3f7363e6e4ec04f1c51d3b1 SHA512 eb174abe40ea15287a697134675e48aba273c174b67c5be6a5258e5cc6666b65aa78a2bb5c7cca449224307419edb3e2cde42ced11d5afe51360954faa615cae
+EBUILD stripe-11.6.0.ebuild 2636 BLAKE2B 7bde9fabf80ddf93dcf895b40d012b72ef33971d4a71bec88bc205d1d60bf2d79c28d77e3733d92c1ce5b2b5ca8e87869e5dbc10c31fcd0663407538c3d01c57 SHA512 a339b677b6501c4222f0ffb18a899534c7860eee1980e516b82646ffe4b4f4ff2f0c1c173f933e526907554005c4bd43f3042f2c9cd06525b8db8ebcc8ff3f16
MISC metadata.xml 673 BLAKE2B 6b85b1f88713d2365274fcff21648748039b48028b3c34c1192e16ca12d0f3b4d14ab13c7c2a744c381898ea0c1304bda8be52d3fadddc1a1b787f010b001398 SHA512 e3178927a69d14f59673acc5eaedda59db5a07e2145ed6fb0597363b60183cb3e7a7b0feefc1d4c9095d52ed96e0be32ef5dc23ad0c20fd6e6b33c830177c0be
diff --git a/dev-python/stripe/stripe-11.6.0.ebuild b/dev-python/stripe/stripe-11.6.0.ebuild
new file mode 100644
index 000000000000..96f27e9fba30
--- /dev/null
+++ b/dev-python/stripe/stripe-11.6.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} 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.192.0
+ dev-python/aiohttp[${PYTHON_USEDEP}]
+ dev-python/anyio[${PYTHON_USEDEP}]
+ dev-python/httpx[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/trio[${PYTHON_USEDEP}]
+ net-misc/curl
+ )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md )
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ if ! use telemetry; then
+ sed -i -e '/enable_telemetry/s:True:False:' stripe/__init__.py || die
+ fi
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # Internet
+ tests/test_http_client.py::TestLiveHTTPClients::test_httpx_request_async_https
+ 'tests/test_integration.py::TestIntegration::test_async_raw_request_timeout[asyncio-aiohttp]'
+ # timing
+ tests/test_integration.py::TestIntegration::test_passes_client_telemetry_when_enabled
+ )
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest tests -p anyio -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"
+}