summaryrefslogtreecommitdiff
path: root/dev-python/stripe
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-15 14:48:25 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-15 14:48:25 +0000
commite4769acf6646f4b0ef28cb695cec8ed128aba920 (patch)
tree56d860ca0e474de6bd71428f2702a2dd994d34b5 /dev-python/stripe
parent17e82681588151572e451b0daf68fd568531d3e4 (diff)
gentoo auto-resync : 15:12:2023 - 14:48:25
Diffstat (limited to 'dev-python/stripe')
-rw-r--r--dev-python/stripe/Manifest4
-rw-r--r--dev-python/stripe/metadata.xml8
-rw-r--r--dev-python/stripe/stripe-7.9.0.ebuild81
3 files changed, 92 insertions, 1 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 8937881b9581..99fea7142dc4 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,7 +1,9 @@
DIST stripe-7.7.0.tar.gz 747906 BLAKE2B 40d6f4cdbefef54df8aa84529c879f9cfe3b36fafb35cdc12e98513ae63e3fc41a38174def79adf2e891445502771437489f73010b206a005a02883ef51400fd SHA512 988bf67fce52c5b48e8a7d0d6dac408fd5bc1bd3cbd0d80b06ab5b7b8c44a5daa231c6f3f5e563cea2a717cbec56ae4a83eac9526a463074ff3d1d2cb68a6b92
DIST stripe-7.8.1.tar.gz 768885 BLAKE2B 4e38fec0751fe7314e42303230d602b5f16daa40d833c749c29fa68cdd954cb604a2a0bcc7527253852499920ab5981629ca325d739fc56330bac4ab31b2bbd4 SHA512 cbee9cc0133fa18efa6582da032685fa44cd0446a2d032015410ca60a68ae5ce4a6dc5f82cedb24b1acc09a3c638e0f59f85e72798ee55603039b6fad27fe98e
DIST stripe-7.8.2.tar.gz 769204 BLAKE2B 44a6d49ab79c0ea7854000502b55445d3ec691152a4bd4a9615095d8605df35ff4f3e3de1a69c2e45c8c4dc773ee626aab61680cafb92cf9a6b34f2f9f5523ef SHA512 7fddb1d668d921bf557a788427c7d7ecf7d47fba06a40185cc31c64ebfac858728654e1c4fbeff4bd76687a693951eec6791d833bc285aba23f352ec04260071
+DIST stripe-7.9.0.tar.gz 772219 BLAKE2B d119308b12589c4de1f54705f80ae627bd7ca26b565f42bfb4569db42183f20c29086933becdaee65177f01fbcf0481a4b9ec0119ef984b471d083600d75b362 SHA512 6d73ef7e2a366634dd5736733d9b798e9df103a9d25a361f649c5d97924fc7d65efd80f2d471b47dfccbc8080a87a18a96c3f40258ca0a9aef7d1b21f7919bb5
EBUILD stripe-7.7.0.ebuild 1975 BLAKE2B f81db822d794121a504266a2ab115a22e4dae67630dc2e282f988f916896d49c45de7c6f99f51a5af5e1dca9b6c7a2117c749e333e7631cba02a8d997b7f2ae9 SHA512 f9033d6a92b310f08b2cc237d05a24f0ab05592c4c91bf24c9b447646839bba820f599e26109e98805fea75df3f4ab52db5a751d3ac2a575391784895b917a3d
EBUILD stripe-7.8.1.ebuild 1978 BLAKE2B fbb8f1492756a0cff2a7316251f71dd916bb5d3b2d29a42920203c03e804e3eef7b75520f0bc16ccef0850ff8ac945388ae37d5c61249f28f4f85dbfe4d209b3 SHA512 0899159eabcb564071564f777ff8e73aca77bed42e544c17362c63e814ffe899227a8ea42d36820a025c26d07e1845973a51847b1e636034d964417b2145b16e
EBUILD stripe-7.8.2.ebuild 1978 BLAKE2B fbb8f1492756a0cff2a7316251f71dd916bb5d3b2d29a42920203c03e804e3eef7b75520f0bc16ccef0850ff8ac945388ae37d5c61249f28f4f85dbfe4d209b3 SHA512 0899159eabcb564071564f777ff8e73aca77bed42e544c17362c63e814ffe899227a8ea42d36820a025c26d07e1845973a51847b1e636034d964417b2145b16e
-MISC metadata.xml 372 BLAKE2B e6a38fdec6fc016068e7a0522ba15e83bf358ba1475e54a9630b1e86c75bc14b790c59716317bd81438a1c770e4d31afbe04400ddcd5dd272715c251fd6cb1a2 SHA512 2d9672b242f2d38654f7906097e597dfbdf75afa3583ea331f61772db95d19a802e83ed523c67a6cf3da18411036055c0996fd04d99199618d5205be8a61bd77
+EBUILD stripe-7.9.0.ebuild 2142 BLAKE2B 0a7f643b68c8ebcd8d9e8ed1ca68858c91943710df9a010d741d52eff4eb37c01dd16bc1551967314ed40a223924df5ca0c421507b8a00493565350670f1edd2 SHA512 24ea46b4c5b66b4c80d43357170b34e89a742a7ff4c7c94912ab2e3693dfd92344394e8519f9faa73493e13149a2e22a066197189547e9c5016174d8956662a7
+MISC metadata.xml 673 BLAKE2B 6b85b1f88713d2365274fcff21648748039b48028b3c34c1192e16ca12d0f3b4d14ab13c7c2a744c381898ea0c1304bda8be52d3fadddc1a1b787f010b001398 SHA512 e3178927a69d14f59673acc5eaedda59db5a07e2145ed6fb0597363b60183cb3e7a7b0feefc1d4c9095d52ed96e0be32ef5dc23ad0c20fd6e6b33c830177c0be
diff --git a/dev-python/stripe/metadata.xml b/dev-python/stripe/metadata.xml
index 9202a9f9538c..5170080cee2d 100644
--- a/dev-python/stripe/metadata.xml
+++ b/dev-python/stripe/metadata.xml
@@ -9,4 +9,12 @@
<remote-id type="pypi">stripe</remote-id>
<remote-id type="github">stripe/stripe-python</remote-id>
</upstream>
+ <use>
+ <flag name="telemetry">
+ Enable sending "telemetry to Stripe regarding request latency
+ and feature usage" by default. Upstream enables it by default
+ in their PyPI distribution; it can also be explicitly controlled
+ via stripe.enable_telemetry variable (boolean).
+ </flag>
+ </use>
</pkgmetadata>
diff --git a/dev-python/stripe/stripe-7.9.0.ebuild b/dev-python/stripe/stripe-7.9.0.ebuild
new file mode 100644
index 000000000000..87cc4774837d
--- /dev/null
+++ b/dev-python/stripe/stripe-7.9.0.ebuild
@@ -0,0 +1,81 @@
+# 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 ~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.178.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"
+}