mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
dev-python/stripe: Bump to 15.4.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
DIST stripe-15.2.1.tar.gz 1520402 BLAKE2B 92d8aae6f9911db5c9e47512c37d0ea13819c5976e0c6e34a13469a1bd8182ebe8afe251ae191d5029cfd03b731ae9d8c37640d9cec088cdd19b85da05942246 SHA512 0712b879ebf9d12ecda58264d787986c2552a7158c2ffe2755962095a2df27d1b07629af417370356c7af3453a433e54b4a36c92e7a9a716af9fd6f3684bd4f9
|
||||
DIST stripe-15.3.1.tar.gz 1516385 BLAKE2B cfdc04afa2c1cbba575cc67bf77375f84487c31a81641a903e82d24157d7f9121fc8ef9e23f57552763af07c7bfde36792d8a37b14053159672437795a968288 SHA512 f2a8c287b94672a9b73152fdaa20e1fcdd0e6d3cbcc6183b3b546a8fce9381a62d1a40e2d2c60756713590a92d5913e4745bd429e868cc58a5dd1404661fc884
|
||||
DIST stripe-15.3.1.tar.gz.provenance 9712 BLAKE2B 6b312c68c711c6afa03fd0650a1719535f76edbb0a34c49e3088fad2b97d76071938135ffd8dc78be01b93ba96a6855c2d22a3e13c9d3ba7d0f00f25eb90cd74 SHA512 1eb4547c84982b1eb50fcf49efc509207a42fb8673c35ea273ac833f4311af1a9ac21d01b9aea8d00a88547cbbf3fc9028458e5eaafc373a2387149d64e250b1
|
||||
DIST stripe-15.4.0.tar.gz 1538270 BLAKE2B e2fed8eb46ec91a8f27ca3408b6b32a0c3b365059a92d6997c5d266c11bb0b11d101f9198ca48c0dfd43e3b6d746eaf26996a6b4d21cc432fe020d3e6dd8caf8 SHA512 544d6c8c2dc47d7f68c097f2eac5cb3075397742031b59fde01d2141e15655feb879b9a9c575dbf65ed5c9d37e4c75adcb53291f9b7e072af625ede33eb3cc2c
|
||||
DIST stripe-15.4.0.tar.gz.provenance 9618 BLAKE2B 7772df6031e1cebb15bbbfff575dc6e7a0b86477dbc6c261221aab1398da0f35c3524f925e92f6931c5fd30195a054421d7241644ed32452af2f0c06f288682d SHA512 c05853f5a4841b2f6e9a1bba6c27eab320f10392b2c922e1bacaaac0fbd3bbd21e6eae7375dc50ea4c9e2dbab1a5a1f5536d88f14d628bead3477968daa93cfb
|
||||
|
||||
92
dev-python/stripe/stripe-15.4.0.ebuild
Normal file
92
dev-python/stripe/stripe-15.4.0.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