diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-05 14:04:26 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-05 14:04:26 +0000 |
commit | 8fd9d385e5bc3c01115ec2ddcb2227607eb90861 (patch) | |
tree | aba1e6ef6b95e94172c009394cd1fcbc383e7d6e /dev-python/stripe | |
parent | 1ddcee0bd115d2f843f82061cb0d1741bf90151d (diff) |
gentoo auto-resync : 05:01:2024 - 14:04:25
Diffstat (limited to 'dev-python/stripe')
-rw-r--r-- | dev-python/stripe/Manifest | 2 | ||||
-rw-r--r-- | dev-python/stripe/stripe-7.11.0.ebuild | 81 |
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 59a718aa6061..c6c5fbb78db0 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,5 +1,7 @@ DIST stripe-7.10.0.tar.gz 783205 BLAKE2B ab06c4f81bd3f2492a1e5982995f5205f345f395b8cc7e470a22af62d57421789208c76097a08019550a61ab65b41ea24305bd303a9e3d6e3cb791fe552bcbc7 SHA512 dbdfd2ca11f592caa31fb53b0204e64292d4471d5d3e607447bbcfabe24db684331d77f0ff12da77ec5c4ad20709328a7366eb55b9c3d804ca39442971cefcde +DIST stripe-7.11.0.tar.gz 783456 BLAKE2B 9317526b9c19d98b921f3fa8222486537b3bfa3a9c239d83098be1d9856a258a67276690c1f1ced6087a8d7f1fb180240f737d67f9ded5605e82de7fc4355fc0 SHA512 5cfa650d43745c8a3ab5588f30c6eaab0952aff060b9fdb84027db3422c88002d074eb29b3e2a40ed1457be6e8cd883b3323e8da538af0991114a10976b86842 DIST stripe-7.9.0.tar.gz 772219 BLAKE2B d119308b12589c4de1f54705f80ae627bd7ca26b565f42bfb4569db42183f20c29086933becdaee65177f01fbcf0481a4b9ec0119ef984b471d083600d75b362 SHA512 6d73ef7e2a366634dd5736733d9b798e9df103a9d25a361f649c5d97924fc7d65efd80f2d471b47dfccbc8080a87a18a96c3f40258ca0a9aef7d1b21f7919bb5 EBUILD stripe-7.10.0.ebuild 2142 BLAKE2B f8a043887b514a6cb95de4e19509ee5bfa8ddf5b95354e0f65b206a43d701c38ef1f236480e927abc9081598495dc306631714c75d7a12b3da99ad7c1620a828 SHA512 8b718b0cee64bbbd49c324821423b4d343d48e92c8a2c011ec9744279e5b5a0a55ff558c48ad18f76d1f5780c60aa1471db3d862dad074572f8f959f9d5f52fc +EBUILD stripe-7.11.0.ebuild 2142 BLAKE2B c24257d04dba834019b94e0128f08d446f6953dfa87faf7b9fb79c14eadf2a525333a8ee9fec920637b899c4b467244978ac1677b01af79b68c975ba8adf81b0 SHA512 fd89abedaec2309bd6186ead14456c119e9ae9ab942feca5c9f85fb3ff6429cb0c38b52f0a406ed3994d34166cf2c848f37a9353546e3137fc0db7b3f15f2be5 EBUILD stripe-7.9.0.ebuild 2139 BLAKE2B 2c6f3765f6309ffbccf97ff2f8383cbd527ddc0e6c358343832a482381db34f2a87ce5966365dda88c2358383624703d9a690f94c721f4217ed2e752b1c6b7d0 SHA512 ab8682ba92a39235b7c4daa5377cf1ba5a096951c0c4e020e17645e4fc67f6f3898a64908a0163eca99f23d48fde69f5aee09f8a4a6347f65df5e6a887fb381a MISC metadata.xml 673 BLAKE2B 6b85b1f88713d2365274fcff21648748039b48028b3c34c1192e16ca12d0f3b4d14ab13c7c2a744c381898ea0c1304bda8be52d3fadddc1a1b787f010b001398 SHA512 e3178927a69d14f59673acc5eaedda59db5a07e2145ed6fb0597363b60183cb3e7a7b0feefc1d4c9095d52ed96e0be32ef5dc23ad0c20fd6e6b33c830177c0be diff --git a/dev-python/stripe/stripe-7.11.0.ebuild b/dev-python/stripe/stripe-7.11.0.ebuild new file mode 100644 index 000000000000..59f175a1076a --- /dev/null +++ b/dev-python/stripe/stripe-7.11.0.ebuild @@ -0,0 +1,81 @@ +# 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.179.0 + dev-python/pytest-mock[${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 + distutils-r1_src_prepare +} + +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" +} |