mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 11:17:21 -08:00
dev-python/stripe: Bump to 15.3.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST stripe-15.1.0.tar.gz 1501673 BLAKE2B d494b52288d89a2ec4f42603a4502ae40391c1101a13f4bbd74f6a40e84885c2fdf519f2c41026ae7ac7bb609c446aca50e1ae65ab1661f9ad4538bd4ada6a2d SHA512 1e050e5c66ba4144adf9f07199987ed89c3618599b2cf03234e43df4dd95885089289ded57ed9e204403c84d13fe6242a7bfe7023e220afb206f9b6e6df9fe32
|
||||
DIST stripe-15.2.0.tar.gz 1520207 BLAKE2B 90e810fea547afdf5db9c00bd1a522e02caac9bf9dde3f3e83f8143ada87bdeb4db3d5a6c774bbd956db230e46089a5754dd414deb02a244c2c4f7c96d2d3cdf SHA512 1959725b10e4068525bc31f1c0bbea9480ebb6ec59487cf0aec63c5aceeb24d3453a8a2d364300f55c7976655184f3b3d6cfb6d4adbcbfff7838ecdb5d54512c
|
||||
DIST stripe-15.2.1.tar.gz 1520402 BLAKE2B 92d8aae6f9911db5c9e47512c37d0ea13819c5976e0c6e34a13469a1bd8182ebe8afe251ae191d5029cfd03b731ae9d8c37640d9cec088cdd19b85da05942246 SHA512 0712b879ebf9d12ecda58264d787986c2552a7158c2ffe2755962095a2df27d1b07629af417370356c7af3453a433e54b4a36c92e7a9a716af9fd6f3684bd4f9
|
||||
DIST stripe-15.3.0.tar.gz 1514134 BLAKE2B 14b8f2e09097c7e1495ca2d22de6a6f00f058ae93cd6c0f4b8d7860569dbfeb3bd0e1cc707282435efdc90fc923db7ec4ef697cf4ed5a3147fdc3119bbd26078 SHA512 0dcfe61ccc9ea56b8cf4da326a3e831f545533dd4858e7cdfcc2d789a44597a010e321df0e601aecd3cd2feb0986380fbda0a67ba10173e7de7f184546524d71
|
||||
|
||||
@@ -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-core
|
||||
PYTHON_COMPAT=( python3_{12..14} )
|
||||
|
||||
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 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