mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 04:39:07 -07:00
dev-python/stripe: Bump to 15.6.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -4,3 +4,5 @@ DIST stripe-15.5.1.tar.gz 1544797 BLAKE2B d2af1a485a4ace353c35240c3daa4cc15b6e55
|
||||
DIST stripe-15.5.1.tar.gz.provenance 9722 BLAKE2B 3b89619847e7ed07348ce8b386063da97d635d4a246e224a16371d1ef4a737d29286e68207da4d3ff045f37d24fdfe9192e7d830780a9dd972ef56fa50c53940 SHA512 27fd6ebf1e35c2057a36a2e930a63b5f88f6ca9371e1c1f3b51e3d181f401ceb0d0068962f3bdd9c197dc3d7c2cb557f2b3c9c955fd39238c54d88ff14ac446a
|
||||
DIST stripe-15.6.0.tar.gz 1562255 BLAKE2B fc893d387de746e183a7157988d29d12ae416ba87f300a011dd728075ce5809d6ae18e32414370227559caa0cacde6c65f1fe2a0fc9a7de104ac608c4feff572 SHA512 bcc3016dfcfd921e4b8a6add963daccede4870c7bdd23f27831b7621c5c6e62727f767ad51706149b970b06d9a6e604c362a768a9c16a2636eb75f6f09ca34a5
|
||||
DIST stripe-15.6.0.tar.gz.provenance 9761 BLAKE2B 502dc35278978a20f92e722cd6ad6c428232fd7c216353c61a293a2e104a5c9191ba0dfa1bdb463cab969610fa2cb3ea98b1dd3bd96c412ef74f76d6ac51fb56 SHA512 e61ecc33b74ac291bad6087d21a517acabb753773a34f317195f4707fdea40177212b921db86052656f12d66f6db9bad93946cb31ad80934f31433369c958e04
|
||||
DIST stripe-15.6.1.tar.gz 1569005 BLAKE2B fd6fd2143291040140eb0172cbc6b04a0ddfc5fa8536d537e074f994d51f00ec8f323eef6361f3d385f9b93a0b7405f3046ed51c5e4f09467e0e7d4c10f79984 SHA512 f46566430302ac8fff22121ee560253a68d909f1fb0d3c27adad4c5f07b9c1d201bf64413ada517748b518c65d5c62a5f158e208370aade1b073634ac6e8b826
|
||||
DIST stripe-15.6.1.tar.gz.provenance 9757 BLAKE2B 94e375fa32980d5462775d78e7b386e7409e65182d627c5242c78fd4b87461ffc8187a94e7ec8ced22eb7f4cba2ed6748b9f49b45dc49d4b584c654ef4479721 SHA512 4e1f1623c50897edc33fef0f89801f30f18eb89b874446620a3a620977257cf8a25938023038d15dd210ba09daadca59778454bcde3fc419a870371fb1bb1cc3
|
||||
|
||||
92
dev-python/stripe/stripe-15.6.1.ebuild
Normal file
92
dev-python/stripe/stripe-15.6.1.ebuild
Normal file
@@ -0,0 +1,92 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=flit-core
|
||||
PYPI_VERIFY_REPO=https://github.com/stripe/stripe-python
|
||||
PYTHON_COMPAT=( python3_{12..15} )
|
||||
|
||||
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.201.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 -o addopts= 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