From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1487595-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id EEA5F15800F
	for <garchives@archives.gentoo.org>; Fri, 17 Feb 2023 06:37:29 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3E01FE0900;
	Fri, 17 Feb 2023 06:37:29 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 22B1EE08FA
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2023 06:37:29 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 4B70E3410A5
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2023 06:37:28 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id ACF708B4
	for <gentoo-commits@lists.gentoo.org>; Fri, 17 Feb 2023 06:37:26 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1676615837.0cca2cddfddf4dbf8c1da587616cd4ccaf4b07f1.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/stripe/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/stripe/Manifest dev-python/stripe/stripe-5.2.0.ebuild
X-VCS-Directories: dev-python/stripe/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 0cca2cddfddf4dbf8c1da587616cd4ccaf4b07f1
X-VCS-Branch: master
Date: Fri, 17 Feb 2023 06:37:26 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: b964bb7c-863d-450e-a8d3-8d9f977d39ca
X-Archives-Hash: 6ae3f1e3b67cff7c69e943361a05794e

commit:     0cca2cddfddf4dbf8c1da587616cd4ccaf4b07f1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 06:29:24 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 06:37:17 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cca2cdd

dev-python/stripe: Bump to 5.2.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/stripe/Manifest            |  1 +
 dev-python/stripe/stripe-5.2.0.ebuild | 70 +++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)

diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest
index 54449a18910f..3906141145f5 100644
--- a/dev-python/stripe/Manifest
+++ b/dev-python/stripe/Manifest
@@ -1,3 +1,4 @@
 DIST stripe-5.0.0.tar.gz 267241 BLAKE2B 6b4a58a355baf2d16d6de8667d1dff655c3334b58933c6172b25963f90bf072ebb5fae197faafd69285ceaaf06ba952c7012c35222df873d0453ec9fcee45cd5 SHA512 3d782abd3d6983734b6248fcb44cb69609475e14b820062882439c11ba8ba64e19f3db7984902157adaf0a80f9c26d18e7fbe414eb27bfeda95a7fae78a07577
 DIST stripe-5.1.0.tar.gz 267508 BLAKE2B 973f286c1a6a6703e903d65267465def0a99c15e65b034a690f12d51e6572412f1007eb8fa7ba9df41f4450e09c8b0584a1ce472d0815757ef1e402021daec67 SHA512 1afe76180922bfdd90c19d9a6326a98a9cc8e138fc9bb26c42f245373f8b4b93bc0144d3c41e0fd5f278fe425f6bb219cda7d4f993db845756de22c0047cb228
 DIST stripe-5.1.1.tar.gz 267508 BLAKE2B da7918aeaa50dcb0e02274a93d39db16cc02b185597b00b442437050df3842c4d9dcbf3477015b7166837845fe6d2f9f9b79fc05ace118c985254545d424b1d9 SHA512 119af52d0a3548dc73a14b3de84cf9b8c465cccc296386b045b7aa23e0db6a071f2d03e6d445c0581863055497378b2a1169bd70119eb4d5ecc62382968da2ef
+DIST stripe-5.2.0.tar.gz 267950 BLAKE2B b7312e4c7e56803fdd64507602df3527efcc964aa7bb6deae59d00df75c72c47cf179382ce6b90ffab5089e7fce9b2e03de0748a091b36dd25d93d8cf6b1d119 SHA512 e928487b690a2c7bce9013ba988ff5a1d9b0ef4b0be56852385925fd5fa4a1b9e655e05b7fa2728d38ed7834eebe621b883851e6a6db625f388866f32c9f8a15

diff --git a/dev-python/stripe/stripe-5.2.0.ebuild b/dev-python/stripe/stripe-5.2.0.ebuild
new file mode 100644
index 000000000000..324896ea5925
--- /dev/null
+++ b/dev-python/stripe/stripe-5.2.0.ebuild
@@ -0,0 +1,70 @@
+# 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_{9..11} 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 ~x86"
+
+RDEPEND="
+	>=dev-python/requests-2.20[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	test? (
+		>=dev-util/stripe-mock-0.151.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"
+}