summaryrefslogtreecommitdiff
path: root/dev-python/stripe
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-15 06:47:25 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-15 06:47:25 +0000
commitbc5dfb0671fb08c7da579b38b0e6abdd19da103f (patch)
tree1be81dbc48e2e0ec0cc322ab3062f1c56edd88be /dev-python/stripe
parent4614848cbaec61bd1083af01a41f39c3b4a9e274 (diff)
gentoo auto-resync : 15:03:2024 - 06:47:25
Diffstat (limited to 'dev-python/stripe')
-rw-r--r--dev-python/stripe/Manifest2
-rw-r--r--dev-python/stripe/stripe-8.7.0.ebuild81
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index dba4a08f5301..34a70bfcc81a 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,5 +1,7 @@
DIST stripe-8.4.0.tar.gz 1071302 BLAKE2B b7aa15e20baa6c0a2e939fda1ee45d3acab72ab771717ca15b0302793f4958257d0fe915c02d92d4be1d51eb6cc6be3bc28d4cda43dffb0ed1e2e958cfc29160 SHA512 b7ddb5a11c379492f5a7eafcc44197e026e3020420a83c294db6bbe2d73b39c4af38746817d0684e84f09232b12b45280d919090a331a9a0d03af4d02e59ef99
DIST stripe-8.6.0.tar.gz 1075310 BLAKE2B cf497317cce5f8525ccc8491ccfe8610f701abc175b9d24099790ab8a5ed7b8c67888960f96d579c7d623162d82e9f26beb09532f84eb7785c93acc3cb516825 SHA512 25fc7396ea0d5cc448a8c9c00f5dfac7ea5181a4c82d7f1b3d81d0e54b55876213ffddcb478391604f228ff5a7bbe6adcfdee0cdfce3ed385be8432c400053bf
+DIST stripe-8.7.0.tar.gz 1080685 BLAKE2B 0d91f852ad88cf09fb5230a421f9b9b5ade3e7617e95f6f0b5ff3bb14e307d272c1d8600a2673d63a408ca24501e71383fa18f527433e9fbc816f6a48fb9c576 SHA512 977c57a4bad1b572dbee566609f28a9b7e3bffea6516ac48b1f69c51a8ee8fb44d342ce886e2809f6c18b633c30f57e35c565817f2dd67d82c23048dc47d66e5
EBUILD stripe-8.4.0.ebuild 2139 BLAKE2B ebca4f16824fb84f12b8a3009d39418bf836d5afe7a7cba989a79e7511cec8e7dd5497c641fc7722a4b91b5b5fd41cc2d66aed9d66c7f85bc0884c66dacdcb61 SHA512 5d06e11939ee3a719576700265c595e974f5b1d4b5b5f3431283e78d6c2eb16dbc9a49e3919e7341e91e00a4130d1345efce1249f098ab27dd7967a32b645094
EBUILD stripe-8.6.0.ebuild 2142 BLAKE2B 12b001219d977c62a6077979b148cce983a3cab06ed9513222d50ee54b5e1958e70d01d906f50e0e2103674c68a0822de16309ce6abfa17e1883d04c1a7c7160 SHA512 9794a2cd535557155735e3805d99b6825f27e827a82b505042e15cfc53d4912c384fc3d9687bdb5eb2474ebac3f3a08d84946e2a617bb18729c2d80ba59a4fe6
+EBUILD stripe-8.7.0.ebuild 2142 BLAKE2B bcc7dd630341fec24d7a7e6b3898ed74c7e2491698bec62dd4a3f7006a4e25d34a02871820df8b832eeaf0e52ecbe86c247a1c302ca6f31a34433c2969fb9603 SHA512 484aec1eedeb70fc0be89e87eda2ce44a368c2ff9a186957340200a7130ed63d351ad49c4e57685eca1d29ccd5e1f33a61e83c2ab603d081e2edc8d4787f0808
MISC metadata.xml 673 BLAKE2B 6b85b1f88713d2365274fcff21648748039b48028b3c34c1192e16ca12d0f3b4d14ab13c7c2a744c381898ea0c1304bda8be52d3fadddc1a1b787f010b001398 SHA512 e3178927a69d14f59673acc5eaedda59db5a07e2145ed6fb0597363b60183cb3e7a7b0feefc1d4c9095d52ed96e0be32ef5dc23ad0c20fd6e6b33c830177c0be
diff --git a/dev-python/stripe/stripe-8.7.0.ebuild b/dev-python/stripe/stripe-8.7.0.ebuild
new file mode 100644
index 000000000000..c90ac78334f1
--- /dev/null
+++ b/dev-python/stripe/stripe-8.7.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.183.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"
+}