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 835D115864F for ; Fri, 24 Mar 2023 05:21:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E60C8E0908; Fri, 24 Mar 2023 05:21:29 +0000 (UTC) Received: from smtp.gentoo.org (dev.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BB053E0908 for ; Fri, 24 Mar 2023 05:21: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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C324A340C98 for ; Fri, 24 Mar 2023 05:21:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB4FC92A for ; Fri, 24 Mar 2023 05:21:25 +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: <1679635280.9aad5e81f66cc9a7ea87d53ed34ada91a09d1750.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.3.0.ebuild X-VCS-Directories: dev-python/stripe/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 9aad5e81f66cc9a7ea87d53ed34ada91a09d1750 X-VCS-Branch: master Date: Fri, 24 Mar 2023 05:21:25 +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: 6b2febe2-9282-4b28-bee5-d739e9eb7df8 X-Archives-Hash: da14686e4574796442ce2c8a8f46e2d0 commit: 9aad5e81f66cc9a7ea87d53ed34ada91a09d1750 Author: Michał Górny gentoo org> AuthorDate: Fri Mar 24 05:14:09 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Mar 24 05:21:20 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9aad5e81 dev-python/stripe: Bump to 5.3.0 Signed-off-by: Michał Górny gentoo.org> dev-python/stripe/Manifest | 1 + dev-python/stripe/stripe-5.3.0.ebuild | 70 +++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 82147d8d8d89..6d006d7ca4de 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1 +1,2 @@ DIST stripe-5.2.0.tar.gz 267950 BLAKE2B b7312e4c7e56803fdd64507602df3527efcc964aa7bb6deae59d00df75c72c47cf179382ce6b90ffab5089e7fce9b2e03de0748a091b36dd25d93d8cf6b1d119 SHA512 e928487b690a2c7bce9013ba988ff5a1d9b0ef4b0be56852385925fd5fa4a1b9e655e05b7fa2728d38ed7834eebe621b883851e6a6db625f388866f32c9f8a15 +DIST stripe-5.3.0.tar.gz 268634 BLAKE2B b6b6ac44f64b2b7f02729840409ed7f432abd6924838445deaa010a98056175bc47504cb110d27f93c1c1a590d759903f6af2189da43076fd3b1242c8f4f2503 SHA512 2ae99b315f0d1059551b86106cd3eb46dfb60dcc31f65f4e3cbda8817461b0071add2ab68eeb885b4faa080043708ac9e673d8a1248bf1c6461c62e1adcafc80 diff --git a/dev-python/stripe/stripe-5.3.0.ebuild b/dev-python/stripe/stripe-5.3.0.ebuild new file mode 100644 index 000000000000..eb800215b7d5 --- /dev/null +++ b/dev-python/stripe/stripe-5.3.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.159.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" +}