mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
dev-python/stripe: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
DIST stripe-9.6.0.tar.gz 1265189 BLAKE2B d5b37cc8c7ee8597b80f9920e782e6eda5ff6905f8b303c4344b345c73c80a37eb1cd8dc9cc30d7321c58070cc5b0180144964d5f285edcff031cb0655b41409 SHA512 d93349c85791abec7d691c2aa726996e3110117dfda5608aa63e39463399200a4f8427dc609fc2a32c7eea005e4a79fd93cffa76762e0914efcd89b83baa58c2
|
||||
DIST stripe-9.7.0.tar.gz 1268225 BLAKE2B 2ae512fa7f24966166e2d64a8e4e9f23077d0d0318c6f85e4b922b59fbf66e7bf884567d86270c96911a82b51ecfd72312dfd42d335801e9dd40a1912150e8f0 SHA512 5c36ca6447f5d4947b0e069fe5d4fa30ce2cf11768efa8abb70fcc9a69bd104fe085707a463d566abb5417f9dd4b6cb1d3bab132d20616267931fd895544236e
|
||||
DIST stripe-9.8.0.tar.gz 1268721 BLAKE2B 12eeb333a51e71f39c366dda1a4bf82c15f7c3673fc4d27c0e25b978a19902b722d44d5b0f17c017638740cb95f353a024f5012ad70b13c0ac7f7b420df4b082 SHA512 3b19ba9709818af12ba2110b32232c9a33f3a43ce33dfeb8a1e0a7c8a2d643f96795ef474ccdef9e780c1ab58bfa3e687105311cc1d5d24c2984d442d539706b
|
||||
DIST stripe-9.9.0.tar.gz 1272880 BLAKE2B 222cc85453d6ed184c7b945d55ca2d35fb5327b3005c04b97d57ab14d44174394f4c7a03d8ed699297cd1b8a7d2e38a1265e66efe07a6c71abefcea7b36df2cc SHA512 49c783e4365e2cc04fbeef66e2678e5e596899cbc90b1edc2192cc7aac6590a138a7315bb2e0f5f504f6a81b7bc3dd8ee7dfb9777d7780d9944b129b0b8e0d2d
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
# 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..12} 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.185.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"
|
||||
}
|
||||
Reference in New Issue
Block a user