From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 4C77E158020 for ; Thu, 17 Nov 2022 06:15:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C989E0920; Thu, 17 Nov 2022 06:15:42 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C9471E091D for ; Thu, 17 Nov 2022 06:15:41 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 481C1340F88 for ; Thu, 17 Nov 2022 06:15:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9B901762 for ; Thu, 17 Nov 2022 06:15:37 +0000 (UTC) From: "Michał Górny" 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" Message-ID: <1668664514.268a21398b0ba5f2a79e68dad53af1a1236cae9e.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.0.0.ebuild X-VCS-Directories: dev-python/stripe/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 268a21398b0ba5f2a79e68dad53af1a1236cae9e X-VCS-Branch: master Date: Thu, 17 Nov 2022 06:15:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1cf6b429-d0e4-44cc-8291-2fbfd26bedf9 X-Archives-Hash: 1eb7341c41d2847a4f1f3bc74d947180 commit: 268a21398b0ba5f2a79e68dad53af1a1236cae9e Author: Michał Górny gentoo org> AuthorDate: Thu Nov 17 05:49:45 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Nov 17 05:55:14 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=268a2139 dev-python/stripe: Bump to 5.0.0 Signed-off-by: Michał Górny gentoo.org> dev-python/stripe/Manifest | 1 + dev-python/stripe/stripe-5.0.0.ebuild | 71 +++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 0f9de2f7b376..18f47a91fbcb 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1 +1,2 @@ DIST stripe-4.2.0.tar.gz 267578 BLAKE2B 1cd08aa37a3735928e65fb401d8817694cbfceff05722aa96ae4880da6ccb6e3139dcf55804efe26a4e1c1814a6734eed1b5754c06efaf2003d9c28efbdb8731 SHA512 8a2660878838b0a2602afb6716db0dd91c2896b9f27224c2b04c800f32705e876d2915b0c5f4f1bdcf8d3d508ca050660e2e923f999bd0a10f9fdabd3acaa750 +DIST stripe-5.0.0.tar.gz 267241 BLAKE2B 6b4a58a355baf2d16d6de8667d1dff655c3334b58933c6172b25963f90bf072ebb5fae197faafd69285ceaaf06ba952c7012c35222df873d0453ec9fcee45cd5 SHA512 3d782abd3d6983734b6248fcb44cb69609475e14b820062882439c11ba8ba64e19f3db7984902157adaf0a80f9c26d18e7fbe414eb27bfeda95a7fae78a07577 diff --git a/dev-python/stripe/stripe-5.0.0.ebuild b/dev-python/stripe/stripe-5.0.0.ebuild new file mode 100644 index 000000000000..85f74b80fdad --- /dev/null +++ b/dev-python/stripe/stripe-5.0.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..11} 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.141.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" +}