mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/stripe: Bump to 15.0.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -3,3 +3,4 @@ DIST stripe-14.3.0.tar.gz 1463618 BLAKE2B 6783b412c94089d13dc1efd14eb43bf2cbed93
|
||||
DIST stripe-14.4.0.tar.gz 1472370 BLAKE2B 5f120bf7f0592d923d8d31ada37d1ba4d7426e61671d7a98fb41bd00783b8f4aefa10434e751f671fc16d3126bad322346e7b0434553775db83ec97b7416be6a SHA512 81198fcfb3b42b82aed612e9b602f2d3e4e3d22529d9d78147e5bc42b0cd91f3042771e56496f4fddb8bf554b1c5f881c8d836f8260d812d676dfa4e941078d7
|
||||
DIST stripe-14.4.1.tar.gz 1473321 BLAKE2B ec9f7a96f8777b7239baef145de3534e43bdd56d308ace8387ce8cd5f3bf1a17438fd806c6e3200076411aac55796b3b41c2cf635a204a73e57cf6698b1498c7 SHA512 9e7f267363629294b81d8f132a371846a407a7f96d57e40fc9ba3597eb5cf34572afac405d5244aa2d1fc8bce0c3c81dc2321926560b9d3c4cd99b80d59c8a32
|
||||
DIST stripe-15.0.0.tar.gz 1486873 BLAKE2B 9f88b8ec81084a23113403297cb000a1e96ed586e927616486b90c3c6ae987497e9c562a7cafc64fde19cb376ee4cd7dcb3b938d1e785c1ca7a12337c04b0672 SHA512 19ecfe897de7428b305eec390fd996b74de9e7e1ba7271d359ba21b7a1cfc27e77e62fe7cc966287d7131d381570e205c66e0e6ab3be9953284811d78a72eb45
|
||||
DIST stripe-15.0.1.tar.gz 1490326 BLAKE2B 8afe273c6f91a5d43a055f3de32c4c3188537a26267242ab4be281b90f88297811129251379be9ed5652f0eb998691cfef74c11bf20db7c0ffbdc631b9795ed9 SHA512 4bbdfdacf421164b15d1b7329d723b24986e978f04f416e9c2c526a1e72692dbb66075feea5cef3660ea950e6c26d4fb2e6eaaf1d06aac125a5a51fe3af1caec
|
||||
|
||||
91
dev-python/stripe/stripe-15.0.1.ebuild
Normal file
91
dev-python/stripe/stripe-15.0.1.ebuild
Normal file
@@ -0,0 +1,91 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=flit
|
||||
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
|
||||
|
||||
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.7.0[${PYTHON_USEDEP}]
|
||||
"
|
||||
# please bump dev-util/stripe-mock dep to the latest version on every bump
|
||||
BDEPEND="
|
||||
test? (
|
||||
>=dev-util/stripe-mock-0.197.0
|
||||
dev-python/aiohttp[${PYTHON_USEDEP}]
|
||||
dev-python/httpx[${PYTHON_USEDEP}]
|
||||
dev-python/trio[${PYTHON_USEDEP}]
|
||||
net-misc/curl
|
||||
)
|
||||
"
|
||||
|
||||
EPYTEST_PLUGINS=( anyio pytest-mock )
|
||||
EPYTEST_XDIST=1
|
||||
distutils_enable_tests pytest
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user