summaryrefslogtreecommitdiff
path: root/dev-python/stripe
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-25 00:07:14 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-25 00:07:14 +0100
commitf8999218b5a6eafa151e7367030cbfdb69e045ed (patch)
tree0d0e9293bcb75153cd18542369fa789ede9338a0 /dev-python/stripe
parentaa4954f71a3ba2293395a8cce2321a70c39c7554 (diff)
gentoo auto-resync : 25:05:2024 - 00:07:14
Diffstat (limited to 'dev-python/stripe')
-rw-r--r--dev-python/stripe/Manifest2
-rw-r--r--dev-python/stripe/stripe-9.8.0.ebuild88
2 files changed, 90 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index cff3574c3e6e..f327c672646d 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,7 +1,9 @@
DIST stripe-9.5.0.tar.gz 1262346 BLAKE2B 45ba78fac985352f1857b7f6e5e4907afc9ff45815419671b9ee6476f04a7bf216fa49eb0008b8804d0a9763885ee5a8d09431ba6c26cca5e2091787353ae688 SHA512 2a530fe88d56a4753a5f497547aaf51ae770c1c616677eaad65d820eef638f5dd35d78486a3105caf97b2986f3940019a7cc0e7f89fe1c4ae83195bccd1ce000
DIST stripe-9.6.0.tar.gz 1265189 BLAKE2B d5b37cc8c7ee8597b80f9920e782e6eda5ff6905f8b303c4344b345c73c80a37eb1cd8dc9cc30d7321c58070cc5b0180144964d5f285edcff031cb0655b41409 SHA512 d93349c85791abec7d691c2aa726996e3110117dfda5608aa63e39463399200a4f8427dc609fc2a32c7eea005e4a79fd93cffa76762e0914efcd89b83baa58c2
DIST stripe-9.7.0.tar.gz 1268225 BLAKE2B 2ae512fa7f24966166e2d64a8e4e9f23077d0d0318c6f85e4b922b59fbf66e7bf884567d86270c96911a82b51ecfd72312dfd42d335801e9dd40a1912150e8f0 SHA512 5c36ca6447f5d4947b0e069fe5d4fa30ce2cf11768efa8abb70fcc9a69bd104fe085707a463d566abb5417f9dd4b6cb1d3bab132d20616267931fd895544236e
+DIST stripe-9.8.0.tar.gz 1268721 BLAKE2B 12eeb333a51e71f39c366dda1a4bf82c15f7c3673fc4d27c0e25b978a19902b722d44d5b0f17c017638740cb95f353a024f5012ad70b13c0ac7f7b420df4b082 SHA512 3b19ba9709818af12ba2110b32232c9a33f3a43ce33dfeb8a1e0a7c8a2d643f96795ef474ccdef9e780c1ab58bfa3e687105311cc1d5d24c2984d442d539706b
EBUILD stripe-9.5.0.ebuild 2432 BLAKE2B 5b6adb86d98c8703f414873599a661d760c0a60f5c5f7885277195473aabd19ddcfab31ad00360495d18b8d34d345c237fe1183181967d0c2ca262b2ec3b1685 SHA512 4aef0c781f46b79b695660122e8e573dca2d2015bca0b27cf0a93f547c29bdfe9c19659887ad6ca6a64f9907b1b65b26444bcfd3c61740c776cd87f5b26cd087
EBUILD stripe-9.6.0.ebuild 2435 BLAKE2B 32fc034c5c1ac6b645b6661ffd16eb8d631a2b805107d6eddbf69b3c107d9fd4624d2e7303308e783d06114e1ff35a6d40d735fa1b0ed9a79f0d18d14b2d1b30 SHA512 9528f01afb84a4cfee24fa0060a926b6b34eec0d24e36bf248ee8ff360f905b71c6ff5c8a003aa2c7460e9390dd95d184175edb01230fb79544b6def09ee48d4
EBUILD stripe-9.7.0.ebuild 2435 BLAKE2B bc1705d2eeb4e9355163d4758daf18d7f5c82ae1ad414dfb05c9244c78610316daaa889eb6bdac94705130f1554ef06c96d4e9774e5480ed88fcc342b9e3efa8 SHA512 78664ee32de5d98259cc8ef27c99718de405d616036150a68dc1810734dd080d9c14b870f60cbea2e83761c6b44c2bec5a99f3990a98ebfd6ba6a8197a041ac4
+EBUILD stripe-9.8.0.ebuild 2435 BLAKE2B bc1705d2eeb4e9355163d4758daf18d7f5c82ae1ad414dfb05c9244c78610316daaa889eb6bdac94705130f1554ef06c96d4e9774e5480ed88fcc342b9e3efa8 SHA512 78664ee32de5d98259cc8ef27c99718de405d616036150a68dc1810734dd080d9c14b870f60cbea2e83761c6b44c2bec5a99f3990a98ebfd6ba6a8197a041ac4
MISC metadata.xml 673 BLAKE2B 6b85b1f88713d2365274fcff21648748039b48028b3c34c1192e16ca12d0f3b4d14ab13c7c2a744c381898ea0c1304bda8be52d3fadddc1a1b787f010b001398 SHA512 e3178927a69d14f59673acc5eaedda59db5a07e2145ed6fb0597363b60183cb3e7a7b0feefc1d4c9095d52ed96e0be32ef5dc23ad0c20fd6e6b33c830177c0be
diff --git a/dev-python/stripe/stripe-9.8.0.ebuild b/dev-python/stripe/stripe-9.8.0.ebuild
new file mode 100644
index 000000000000..3bf97ad94c6e
--- /dev/null
+++ b/dev-python/stripe/stripe-9.8.0.ebuild
@@ -0,0 +1,88 @@
+# 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.186.0
+ dev-python/aiohttp[${PYTHON_USEDEP}]
+ dev-python/anyio[${PYTHON_USEDEP}]
+ dev-python/httpx[${PYTHON_USEDEP}]
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ dev-python/trio[${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
+ # https://github.com/stripe/stripe-python/pull/1297
+ sed -e 's:from mock:from unittest.mock:' \
+ -i tests/test_http_client.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest tests -p anyio -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"
+}