summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-04-15 11:22:52 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2022-04-15 11:22:52 +0300
commit6570ca4b3d0c8214d7888f09279d8e2c0af0b288 (patch)
tree268e34fdf973c4e857be96dd9c607a95c0b0503c /dev-python/stripe
parentdev-java/tomcat-servlet-api: Stabilize 9.0.60 arm64, #838418 (diff)
downloadgentoo-6570ca4b3d0c8214d7888f09279d8e2c0af0b288.tar.gz
gentoo-6570ca4b3d0c8214d7888f09279d8e2c0af0b288.tar.bz2
gentoo-6570ca4b3d0c8214d7888f09279d8e2c0af0b288.zip
dev-python/stripe: add 2.72.0
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-python/stripe')
-rw-r--r--dev-python/stripe/Manifest1
-rw-r--r--dev-python/stripe/stripe-2.72.0.ebuild68
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 80151106876e..d9887263edb2 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -2,3 +2,4 @@ DIST stripe-2.66.0.tar.gz 234929 BLAKE2B 289c3464c3aa9ef5ebeccaffde383271ca23e70
DIST stripe-2.67.0.tar.gz 235426 BLAKE2B ee396b0b7d3991afdd81e6b051fad0168a7b3dcfaddccc7700292878fc437788dcc40480fea2131dd52e3b787dc6e7b420d6023079f55d9365f76076cc51070d SHA512 099208259c6ca8d69fd6f39f72b9f12f41eace2f0a2a08b017f6141ad06882df742749941326fb8d9898db7c59e32ed74a464ad372d6f7f0a929c9ae4e4d2475
DIST stripe-2.70.0.tar.gz 239653 BLAKE2B d59d7b452e91169e83e4d4bc10b544fc94c48aa3a967c899136b1b9ea60e835d998c1a5a0c5e131989d9628c36b77e3fe133952dddbede69d0bcfa11dc9fc640 SHA512 62f40d82e4a5d37ce070a2457b8372d903993e209f6a042ab97a93f5ee98eb994c0cac070451e2b130df9a72f4a9ece65600266735b438aff3cc5cf09e217b27
DIST stripe-2.71.0.tar.gz 239817 BLAKE2B c1b8fad45e7e9fee79f841502aaad1a849f345357d2facfab833bc50129c5d9eac6c2af128ef572f9d295da966b8a38b095786b44bf026eac6f6d001470ae60a SHA512 5acbaba1e2a5e063beafd0b67994a4a4c7d207f220a49e84b7ab3c0288a92150fd10048f7782e32c3033f4a920f5e81a0893610545e5d1f49ee6dbe62aa4b3a5
+DIST stripe-2.72.0.tar.gz 239987 BLAKE2B 8eb1ea8446cb106c75b0a005478ae28c893338ecc0bb2d0017ad7e9a775108ed0eac1d3e05a5038330b89a47ffc311d4d0367df63c9d0ce01552afd7e4f3e82e SHA512 b9f98ce94002cbebdad5e2b7dc90b4f4d1b4c637db7509881a346c772f90d2154a49109aee15f650559ed8c253e82f466a5a4b6409efc8e00442c80195e1a3a8
diff --git a/dev-python/stripe/stripe-2.72.0.ebuild b/dev-python/stripe/stripe-2.72.0.ebuild
new file mode 100644
index 000000000000..b88af4c76c63
--- /dev/null
+++ b/dev-python/stripe/stripe-2.72.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Stripe python bindings"
+HOMEPAGE="https://github.com/stripe/stripe-python"
+SRC_URI="mirror://pypi/s/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=dev-python/requests-2.20[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ >=dev-util/stripe-mock-0.122.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"
+}