summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-04-22 10:13:26 +0200
committerMichał Górny <mgorny@gentoo.org>2022-04-22 10:19:11 +0200
commit247e62b2a129526b85f66eb763bacd7fdc085254 (patch)
tree1edcb2e86de6414183d2821867cb3a3d5643ab86 /dev-python/stripe
parentdev-python/google-auth: Bump to 2.6.6 (diff)
downloadgentoo-247e62b2a129526b85f66eb763bacd7fdc085254.tar.gz
gentoo-247e62b2a129526b85f66eb763bacd7fdc085254.tar.bz2
gentoo-247e62b2a129526b85f66eb763bacd7fdc085254.zip
dev-python/stripe: Bump to 2.74.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/stripe')
-rw-r--r--dev-python/stripe/Manifest1
-rw-r--r--dev-python/stripe/stripe-2.74.0.ebuild71
2 files changed, 72 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index a9bdbbe1a848..7e34ab2903d7 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -3,3 +3,4 @@ DIST stripe-2.70.0.tar.gz 239653 BLAKE2B d59d7b452e91169e83e4d4bc10b544fc94c48aa
DIST stripe-2.71.0.tar.gz 239817 BLAKE2B c1b8fad45e7e9fee79f841502aaad1a849f345357d2facfab833bc50129c5d9eac6c2af128ef572f9d295da966b8a38b095786b44bf026eac6f6d001470ae60a SHA512 5acbaba1e2a5e063beafd0b67994a4a4c7d207f220a49e84b7ab3c0288a92150fd10048f7782e32c3033f4a920f5e81a0893610545e5d1f49ee6dbe62aa4b3a5
DIST stripe-2.72.0.tar.gz 239987 BLAKE2B 8eb1ea8446cb106c75b0a005478ae28c893338ecc0bb2d0017ad7e9a775108ed0eac1d3e05a5038330b89a47ffc311d4d0367df63c9d0ce01552afd7e4f3e82e SHA512 b9f98ce94002cbebdad5e2b7dc90b4f4d1b4c637db7509881a346c772f90d2154a49109aee15f650559ed8c253e82f466a5a4b6409efc8e00442c80195e1a3a8
DIST stripe-2.73.0.tar.gz 240478 BLAKE2B d85b31670b3e055c42ccaeeb49ca34ed48e0ca299ab2a4e5d87e7f8e8121c52a072027b390bd21e8b7cab4fd77952fa2b6273eccf1a1c933129326a051ebb8d3 SHA512 e2b41d28c9a63564a86e2acd1f36727b34f9133b43104ad6736ad9f706396ce534e59252728342ffea1ce766fcc15b9fc24a00a7797547e8e3fc05943a462a9c
+DIST stripe-2.74.0.tar.gz 240731 BLAKE2B 68d80f0dab200087f454c98bfabf483ce7b6db06061d5dce81bc258e0425576b54a5e9c6a9134d59064ae978db4bdda407f12eaa8ac48b51a87722473732a8b9 SHA512 f7f549e5b5eec38248320f7852f0c5fa3476f3d68aab646f04f207e0d6be20cb54ed13e4093d40313502c9aed7b60392c20c1baded4bb845703647d8c022342b
diff --git a/dev-python/stripe/stripe-2.74.0.ebuild b/dev-python/stripe/stripe-2.74.0.ebuild
new file mode 100644
index 000000000000..a0b230f30493
--- /dev/null
+++ b/dev-python/stripe/stripe-2.74.0.ebuild
@@ -0,0 +1,71 @@
+# 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/
+ https://pypi.org/project/stripe/
+"
+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.124.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"
+}