diff options
Diffstat (limited to 'dev-python/stripe')
-rw-r--r-- | dev-python/stripe/Manifest | 2 | ||||
-rw-r--r-- | dev-python/stripe/stripe-7.1.0.ebuild | 72 |
2 files changed, 74 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 8f7ecfc3f2cb..002a99e540ef 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,5 +1,7 @@ DIST stripe-6.7.0.tar.gz 293207 BLAKE2B 5c07b6f04aa72045cccb4422b1f163cf6351f100d2245a4f93952d641ed8e4735c964b850179906bc7af13730724f596cd2cfa85c3d8fb8792f6a4e561337b0a SHA512 778c3ffa177e52b62bf4821b2f0aaa5eef01d8690526c42015d192bb06332a2a5fd143c8dab82497803adcfed963b7ccf06dc77908b21a7a7c77f9ef39b39c12 DIST stripe-7.0.0.tar.gz 378521 BLAKE2B a53248162b44776f0c457064c3d2d99e7f6ec8561d1a88ee7bec655d20ff9dada3c92d7d764b3775950902a908f1d9d82c0002483cd168646f1cbde19640ca92 SHA512 154a772880522e5567907c3c9c6024f18ee1e81b4e192f30dbe8ea4b0fa3d1cf4b04d9de7ab9f0911e2a3d9c5f65207fd4d499b4e5ea3c606c738506d2eb15d5 +DIST stripe-7.1.0.tar.gz 737411 BLAKE2B 9db3d016e0a4180b377b9a7e4251f622ff62f2fd29e8fa6680941e4ce4b8585f675ab46eb46ba02b3f7e07679f048a3b6429a7ca0ebdb23ef41cd159111e6ca1 SHA512 240e0e0ba275e255e64d91036dc6489c60079d1ae031135b3fbb7f0db1aa12bf7251a303dfd56e1eac45bb0c667d76b64f4866b558ac3b78ccc0b9ebb8016bff EBUILD stripe-6.7.0.ebuild 1911 BLAKE2B 0233bb23196ecd23022c85dbe304f83f84c9f992c558dca7c2fa3869acb82751644d1306dca3f2b27f6d4fe8cc625e22328e04bee232b21873c5ef4e963c9df6 SHA512 17b5ed9d8d5f8748165703cdcac110a40eb0505304d6649d56d57316148e0097983afc6d15170195b0c1e86348b6437696e1773a2132e9ca14dc6b3dcd04ee72 EBUILD stripe-7.0.0.ebuild 1913 BLAKE2B 5a4402b2ab462b8e692b5a6f3857a19c465f5c34b95786c9279549f5d03ba054c70e33e986fbda77fb45a881a9dfa4076095ffb88cfe47dbfda802df7a2422e9 SHA512 d4c0e62f3a101c2fe2db9ddbdaab2f00f6052db2690e4d8c893b166296bfa1efc0e8afe5f125816d37eead4bbab183c602e48821710287b411c4d6df81d35eb2 +EBUILD stripe-7.1.0.ebuild 1913 BLAKE2B 464bdd3dd7c56b058f5fff69e34ccfeb556dfa6c23c1ada2cbd4324ddca2bda140430108f2aad5f422d08bad7ad64eb830ed2463fb8578646d77054e56b194bc SHA512 77266f6919d8c05d990c340399fcced2790cd7333ad7b3416b9865443ea01c21a27b0511178df663c407ba4cee9cbb90ffae280a8bcf5e10f6fd299495a7f3f0 MISC metadata.xml 372 BLAKE2B e6a38fdec6fc016068e7a0522ba15e83bf358ba1475e54a9630b1e86c75bc14b790c59716317bd81438a1c770e4d31afbe04400ddcd5dd272715c251fd6cb1a2 SHA512 2d9672b242f2d38654f7906097e597dfbdf75afa3583ea331f61772db95d19a802e83ed523c67a6cf3da18411036055c0996fd04d99199618d5205be8a61bd77 diff --git a/dev-python/stripe/stripe-7.1.0.ebuild b/dev-python/stripe/stripe-7.1.0.ebuild new file mode 100644 index 000000000000..110df1be151a --- /dev/null +++ b/dev-python/stripe/stripe-7.1.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.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.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" +} |