From 9f6a82a85d400d6ae7de04c43cee88dbc6bc4da0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 26 Jun 2024 00:12:24 +0100 Subject: gentoo auto-resync : 26:06:2024 - 00:12:24 --- dev-python/stripe/Manifest | 2 + dev-python/stripe/stripe-10.0.0.ebuild | 88 ++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 dev-python/stripe/stripe-10.0.0.ebuild (limited to 'dev-python/stripe') diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index e3e24e3a3ea5..97c69b0e3b5e 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,5 +1,7 @@ +DIST stripe-10.0.0.tar.gz 1284985 BLAKE2B c2cde142b324fb622c7b7c3b967d01caf3a31c7832825b750e88ff7a4b8b41efe457c40ce329977f7df39b54ecf267812174a31682106aaecda78ebe53322467 SHA512 fa72997cde84a7fd871e9be53a560bce07041dddd9db7e37942b1c7cfaee8c2fd3a671f08f1b567b60aee017f7a6b9662dd2cfb3a06036bd9b0f3a03a395e0df DIST stripe-9.10.0.tar.gz 1273670 BLAKE2B ebe42096846a124dea93744b26103dfc0a82f51191be612962258d7ab8c903e3da707dad3e35bafaa7431dd65a08234d9df5f9a614ff1959d86dc2d992ae7ad0 SHA512 f2a22534703add04512fa5ee124bd0ac48dd8a69dd19438260e9fce2cd00b659b9b014f76e325b6b0e51c79c157d15acb775d4ee4e1401a837d7e7dd81e81191 DIST stripe-9.12.0.tar.gz 1277151 BLAKE2B a23e490ac99f3814db204cd8ad71793b5da73a82c420823cecd87dad5f17c9dbe44a7dcdfbb519b5db4cb488f286e231029827bae25657c2bf4183d1c4dd8406 SHA512 c6c4a4cfeddda4c0e4042b31addea6885819304b469e4f7f701c894fca2d1ccca867dac511abf8d9dd9fc7cc135185387a5b55d37558b9355ee4add16b6318cb +EBUILD stripe-10.0.0.ebuild 2435 BLAKE2B 44a70137984ce5bbcb00a55c204dadbc1296af66644ce29227a9f17aba38dff54ff40799251f9d712559390b063fc0f7293225bb79065e8cebb7191937d4838a SHA512 9d751f6868c342e2a486befbfdd270d842af1fca53860731e2afc5b0a4ca2111a907a63c1785efd93cb822a3bb1ac0e3f47f8a131c2b3d3d1694ee2ac8555c93 EBUILD stripe-9.10.0.ebuild 2432 BLAKE2B 2d67456cd2f45ab9e6a74a706a71e0777d6cbfb91d464b1196fb27397e2bd85531976d39140776b700036087469884cb6e8e76a3d9ca338d221ac14ecd33eb1b SHA512 1e25a5c2267bb174c53b2f783907ff2e179e609d13fce5c87e042eeb5df92b7f3dd20f93a4b05b63b124433a6f5e3d1f707a1a501e44dec301ef76f1e38330dc EBUILD stripe-9.12.0.ebuild 2435 BLAKE2B 44a70137984ce5bbcb00a55c204dadbc1296af66644ce29227a9f17aba38dff54ff40799251f9d712559390b063fc0f7293225bb79065e8cebb7191937d4838a SHA512 9d751f6868c342e2a486befbfdd270d842af1fca53860731e2afc5b0a4ca2111a907a63c1785efd93cb822a3bb1ac0e3f47f8a131c2b3d3d1694ee2ac8555c93 MISC metadata.xml 673 BLAKE2B 6b85b1f88713d2365274fcff21648748039b48028b3c34c1192e16ca12d0f3b4d14ab13c7c2a744c381898ea0c1304bda8be52d3fadddc1a1b787f010b001398 SHA512 e3178927a69d14f59673acc5eaedda59db5a07e2145ed6fb0597363b60183cb3e7a7b0feefc1d4c9095d52ed96e0be32ef5dc23ad0c20fd6e6b33c830177c0be diff --git a/dev-python/stripe/stripe-10.0.0.ebuild b/dev-python/stripe/stripe-10.0.0.ebuild new file mode 100644 index 000000000000..7925c1fc5c50 --- /dev/null +++ b/dev-python/stripe/stripe-10.0.0.ebuild @@ -0,0 +1,88 @@ +# 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..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.186.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 + ) +" + +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 + # https://github.com/stripe/stripe-python/pull/1297 + sed -e 's:from mock:from unittest.mock:' \ + -i tests/test_http_client.py || die + distutils-r1_src_prepare +} + +python_test() { + 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" +} -- cgit v1.2.3