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 57A791581B7 for ; Fri, 2 Feb 2024 04:12:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4BC7FE2AAA; Fri, 2 Feb 2024 04:12:31 +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 22FE4E2A9C for ; Fri, 2 Feb 2024 04:12:31 +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 39C4934322C for ; Fri, 2 Feb 2024 04:12:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6225514C6 for ; Fri, 2 Feb 2024 04:12:27 +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: <1706847143.3a1b6c57b197ce915746987d833be262301eccb3.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-8.1.0.ebuild X-VCS-Directories: dev-python/stripe/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 3a1b6c57b197ce915746987d833be262301eccb3 X-VCS-Branch: master Date: Fri, 2 Feb 2024 04:12:27 +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: a1a57553-3c7c-4a15-a595-07f08d24f107 X-Archives-Hash: 91a9601c47984d59916d1892d94b8408 commit: 3a1b6c57b197ce915746987d833be262301eccb3 Author: Michał Górny gentoo org> AuthorDate: Fri Feb 2 04:03:25 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Feb 2 04:12:23 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a1b6c57 dev-python/stripe: Bump to 8.1.0 Signed-off-by: Michał Górny gentoo.org> dev-python/stripe/Manifest | 1 + dev-python/stripe/stripe-8.1.0.ebuild | 81 +++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index c2827bc3ad84..eb9c0019afc4 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -3,3 +3,4 @@ DIST stripe-7.12.0.tar.gz 783948 BLAKE2B 063df7bbc118847bdee35f2919bd8023f4d58b5 DIST stripe-7.13.0.tar.gz 789362 BLAKE2B 326a8b0987ffc7b9bcca2c3fbff548770223a6e153ac4b04fdfe70c400ce0b7d06d40182727ca2fc0ab700f57133481510aec9432c6582dec2a34eba57e682fe SHA512 0ed4d7d1781236f8e6bb3685680f59cf9c3bdf8645e0f5cd17753d079e42965660666ec76cb65ee6d4145514706fd39f6c0f1af331033d0eb3f47f8445082be7 DIST stripe-7.14.0.tar.gz 793052 BLAKE2B fa0cf2c57a1cc6ab2eccfa5c1882e2b0ef62d3d92b392ab23df495c93dad52b43e609c1938af4403a3d1c87d9d73b08a9536d01ca5a7f98a5caebcbaf894d5be SHA512 c40b1a3a4c5af132b30402e9f3860fd2e463e2ca263bc4a072975a744a86e3659c9499cab2ed8f10dd076bb896c2ae4d8a79d8307e2307b598ebe24728a81025 DIST stripe-8.0.0.tar.gz 1070432 BLAKE2B 9f0b605d1c2c5f58dafcc78fb3d4878406c466b92475d08510116352325f5ba6ff3dc379fbd914b25faac7ced7e3fe5f52eecabbff5c479eaaf567cdbcb6a900 SHA512 c5ed151b41e3b2b11d502d51aad7c5c575e6ff151dcab8ffd86e32b4f37eeb1a6e381380b123802af938bb2adfbdda8a71c00e9e0b68e9493469cc6a90d94185 +DIST stripe-8.1.0.tar.gz 1065303 BLAKE2B be82278fa4b401c0259e5d48a4d232557cda98771254cec5dddd7ef5bcd2896e7545d9a3463c9d27da5b6df0b98ff07de292888c00c92fa51f4ebe1b04806e7b SHA512 fbc2c7d3d8da5d0ba261c38bd9371df26beab4a509c86fac6f759678fe8fb387a178bcf49b4cf4a10d44469bbac1626a0bc79d5ba99797f6fbdaa7fc5fdd34b4 diff --git a/dev-python/stripe/stripe-8.1.0.ebuild b/dev-python/stripe/stripe-8.1.0.ebuild new file mode 100644 index 000000000000..47a12cdc7672 --- /dev/null +++ b/dev-python/stripe/stripe-8.1.0.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} 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 ~arm64 ~x86" +IUSE="telemetry" + +RDEPEND=" + >=dev-python/requests-2.20[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.5.0[${PYTHON_USEDEP}] +" +# please bump dev-util/stripe-mock dep to the latest version on every bump +BDEPEND=" + test? ( + >=dev-util/stripe-mock-0.181.0 + dev-python/pytest-mock[${PYTHON_USEDEP}] + net-misc/curl + ) +" + +distutils_enable_tests pytest + +DOCS=( LONG_DESCRIPTION.rst CHANGELOG.md README.md ) + +src_prepare() { + if ! use telemetry; then + sed -i -e '/enable_telemetry/s:True:False:' stripe/__init__.py || die + fi + distutils-r1_src_prepare +} + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest tests -p pytest_mock +} + +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" +}