diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-11-22 07:52:17 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-11-22 08:48:35 +0100 |
commit | 14f74ccc2d91265c828468f1c0a41e65cb52b60c (patch) | |
tree | 03788cf6e946a4fd63fbddd661dcd0a56b7862c0 | |
parent | dev-python/pygments: Bump to 2.17.2 (diff) | |
download | gentoo-14f74ccc2d91265c828468f1c0a41e65cb52b60c.tar.gz gentoo-14f74ccc2d91265c828468f1c0a41e65cb52b60c.tar.bz2 gentoo-14f74ccc2d91265c828468f1c0a41e65cb52b60c.zip |
dev-python/stripe: Bump to 7.6.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | dev-python/stripe/Manifest | 1 | ||||
-rw-r--r-- | dev-python/stripe/stripe-7.6.0.ebuild | 73 |
2 files changed, 74 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 7ede9ba7de6b..95129e0ed691 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -5,3 +5,4 @@ DIST stripe-7.2.0.tar.gz 738081 BLAKE2B 9d46139f989b9c5d50989ab21bc4c4d2f825b1bb DIST stripe-7.3.0.tar.gz 745559 BLAKE2B 01bb0f1eda5cf844331d5883f7224c11bc7f90b0e179ba4df31bec88d35988031968209322022802e3c7cbad15314ab48ae185acd6485def5a2280cc391373cb SHA512 a80af0fd3e49819bef9d8796ef817b0d58105f7a91b160beb4ff7a30ea9aac1590d5ff05fca5334b9da1dd125a4500e5cb32afbe990a8d15463d913a967e78e5 DIST stripe-7.4.0.tar.gz 743353 BLAKE2B 30246bf8c5c922fe1ab906757fef064d4f6eea6989825e1ddabc1ad3fad95cd486bcaa3be860045c29daa2f3c84f65a01e275c919da286d8f0d81cfa3aa512b8 SHA512 9e67fbfdd4fc65ad72a56bc841316e803eca031307a3ced4ba5773773a9920fd1d2e11cb7de6e6da4b2aae78611e198d999d85a5df65d3d7a43af195a47a84c7 DIST stripe-7.5.0.tar.gz 735899 BLAKE2B e3b58f5e949cdea3f177cf87c82d15f1bd8a9fe3bbd8a07dd4f25d06e555d3e4f2cfd7f03d810ac80cefa70d5e4cbf77da6c3b77d091955530c9d18aedea7d34 SHA512 34d1a6e7cfc826c2f48321e07fed81fe8fdf19d4865f7bc657c81e170f55c8685331b550596b31fd20d69e130a9547539507fd22a772ac15a09d14492120e2f9 +DIST stripe-7.6.0.tar.gz 743504 BLAKE2B 32b82cd34241f00c259edc3e0d46d25337cd2490e6c3f4fb9d90d13e785f5e844fbaf66b224a7ae2ac7643d80b90eb36fde465ffdae058ded7741cb53dca5ec6 SHA512 5383ee5bc7e128840f9a1a738eca3bd6ce4a98df554243308d3b6fc667b519b996fc63d34c29abfc4f2f9082e8062aaf9aacdb3edb70e4ef2a6556228926daa2 diff --git a/dev-python/stripe/stripe-7.6.0.ebuild b/dev-python/stripe/stripe-7.6.0.ebuild new file mode 100644 index 000000000000..554c53012571 --- /dev/null +++ b/dev-python/stripe/stripe-7.6.0.ebuild @@ -0,0 +1,73 @@ +# 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.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.178.0 + dev-python/pytest-mock[${PYTHON_USEDEP}] + net-misc/curl + ) +" + +distutils_enable_tests pytest + +DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md ) + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest tests -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" +} |