commit:     f92e6f74b73ba36b697750f7afaaab063ca023c1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 17 02:52:23 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct 17 02:52:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f92e6f74

dev-python/stripe: Bump to 7.0.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/stripe/Manifest            |  1 +
 dev-python/stripe/stripe-7.0.0.ebuild | 72 +++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 948a6ae6d3e0..ea2e016ae1fe 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -2,3 +2,4 @@ DIST stripe-6.3.0.tar.gz 276422 BLAKE2B 
2fa438593bdec94f5c8306ee180921c2920e8995
 DIST stripe-6.5.0.tar.gz 290534 BLAKE2B 
40672358ae9b962f14cb3dad669e7857bf52981b1801325f92193b2cd42e42a7ad14dcd25272ec36589c103c28b10c8eaae0fe6175eb10b00a6a0f278dee5312
 SHA512 
920bb7e0a0e1cbd4b5e085928f28c12ab793bfc1e1aa29aa58f4cbf11f1bfdfeadac84d2be1fc9e14e70ce9a2f9e4900112cf982b6bab220e1cc09569d7db2f4
 DIST stripe-6.6.0.tar.gz 291636 BLAKE2B 
33a565de61e2a371d2ad0cf523385b113e3164a4c972ba77383ba7dbc77aea9d755cc74f3ed15e5abb6f6d2f4c51f4c5859107c74950ca2831e092b4cf3fcc9e
 SHA512 
327df0a8758c96b06f9d0bfd1da5450f328a55becabbae6c04960d4ad2abbac4a71d6c06cfe34c05bf2e87a2d330a9dbb303098165befa797a88d07d18be24c1
 DIST stripe-6.7.0.tar.gz 293207 BLAKE2B 
5c07b6f04aa72045cccb4422b1f163cf6351f100d2245a4f93952d641ed8e4735c964b850179906bc7af13730724f596cd2cfa85c3d8fb8792f6a4e561337b0a
 SHA512 
778c3ffa177e52b62bf4821b2f0aaa5eef01d8690526c42015d192bb06332a2a5fd143c8dab82497803adcfed963b7ccf06dc77908b21a7a7c77f9ef39b39c12
+DIST stripe-7.0.0.tar.gz 378521 BLAKE2B 
a53248162b44776f0c457064c3d2d99e7f6ec8561d1a88ee7bec655d20ff9dada3c92d7d764b3775950902a908f1d9d82c0002483cd168646f1cbde19640ca92
 SHA512 
154a772880522e5567907c3c9c6024f18ee1e81b4e192f30dbe8ea4b0fa3d1cf4b04d9de7ab9f0911e2a3d9c5f65207fd4d499b4e5ea3c606c738506d2eb15d5

diff --git a/dev-python/stripe/stripe-7.0.0.ebuild 
b/dev-python/stripe/stripe-7.0.0.ebuild
new file mode 100644
index 000000000000..f91c6f71034b
--- /dev/null
+++ b/dev-python/stripe/stripe-7.0.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2023 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 ~x86"
+
+RDEPEND="
+       >=dev-python/requests-2.20[${PYTHON_USEDEP}]
+       >=dev-python/typing-extensions-4.0.0[${PYTHON_USEDEP}]
+"
+# please bump dev-util/stripe-mock dep to the latest version on every bump
+BDEPEND="
+       test? (
+               >=dev-util/stripe-mock-0.177.0
+               dev-python/pytest-mock[${PYTHON_USEDEP}]
+               net-misc/curl
+       )
+"
+
+distutils_enable_tests pytest
+
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md )
+
+python_test() {
+       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"
+}

Reply via email to