summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-02-16 22:52:04 +0100
committerMichał Górny <mgorny@gentoo.org>2022-02-16 23:34:03 +0100
commitc4f6ec63d2e0ae176bf97056e40226b1bb93b3c5 (patch)
tree625398b555368ab61424f6c5c74ed77592b94932 /dev-python/stripe
parentdev-python/oslo-utils: Bump to 4.12.2 (diff)
downloadgentoo-c4f6ec63d2e0ae176bf97056e40226b1bb93b3c5.tar.gz
gentoo-c4f6ec63d2e0ae176bf97056e40226b1bb93b3c5.tar.bz2
gentoo-c4f6ec63d2e0ae176bf97056e40226b1bb93b3c5.zip
dev-python/stripe: Bump to 2.66.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.66.0.ebuild62
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 84db4ba2c82e..925e74355ba1 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,2 +1,3 @@
DIST stripe-2.64.0.tar.gz 234442 BLAKE2B 504e32c19f1a65a39ee709d3abc7211d648c7aaf8493edb4130d49d3fbbebea4ec7d2c116b9b715e9e0d5d383578c477ae0e2cbace51f5b8574d540e9b9238d8 SHA512 5055b5a712c0891f3660d00fe7bb27452cce33aa4a9c70fbd7391dd989d31aeb8d8288c3cdd22747b6fd4c480be17f7ab9428c31ea7d2c674e175e77f4f6a0b7
DIST stripe-2.65.0.tar.gz 234847 BLAKE2B 474757c17abd5259f46913d5be0fa1130e64608f0306d772d6776bc34b76a62c2a7cc1dbe812201d867b06e361f9ec905e0a12bb4830e9ccc1e5211e2aeecd6b SHA512 309a3e2202e7e8983bf7d8a403a588c6793f35866bf44edf6fc2877624a98716033e633b1f38790b2731049cfef3f90c878b5bc9df65dce9f4606414944dc8f4
+DIST stripe-2.66.0.tar.gz 234929 BLAKE2B 289c3464c3aa9ef5ebeccaffde383271ca23e704303d5b5499d1f5f1f197483088781d16878749bca03c8ea56209a22173c376ef00510f53d81c733f0a626af8 SHA512 d716e82580757ec0b187a74de1f8ef7bbe2f32468f13c551886bcbadf631eef001df9f4d249f091856b009545ca8b6d60f16c07e79345fee33651e7d27fb31c0
diff --git a/dev-python/stripe/stripe-2.66.0.ebuild b/dev-python/stripe/stripe-2.66.0.ebuild
new file mode 100644
index 000000000000..9c29dc6f0a0d
--- /dev/null
+++ b/dev-python/stripe/stripe-2.66.0.ebuild
@@ -0,0 +1,62 @@
+# 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.118.0
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ net-misc/curl
+ )
+"
+
+distutils_enable_tests pytest
+
+DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md )
+
+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"
+}