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 4C8101581C1 for ; Sat, 6 Jul 2024 05:29:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 49DABE2B75; Sat, 6 Jul 2024 05:29:36 +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 27D64E2B75 for ; Sat, 6 Jul 2024 05:29:36 +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 39573343090 for ; Sat, 6 Jul 2024 05:29:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 724D61DD3 for ; Sat, 6 Jul 2024 05:29:32 +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: <1720243761.0a3795cbb00d89427e885a9d43c5f93263e59b24.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-10.2.0.ebuild X-VCS-Directories: dev-python/stripe/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 0a3795cbb00d89427e885a9d43c5f93263e59b24 X-VCS-Branch: master Date: Sat, 6 Jul 2024 05:29:32 +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: e875c0dc-1f16-4835-815b-5b6ff3a8f852 X-Archives-Hash: 056731557e1855f6d6b580891cd96311 commit: 0a3795cbb00d89427e885a9d43c5f93263e59b24 Author: Michał Górny gentoo org> AuthorDate: Sat Jul 6 05:06:19 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Jul 6 05:29:21 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a3795cb dev-python/stripe: Bump to 10.2.0 Signed-off-by: Michał Górny gentoo.org> dev-python/stripe/Manifest | 1 + dev-python/stripe/stripe-10.2.0.ebuild | 88 ++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 5c69bb22232d..95db91056a4c 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,4 +1,5 @@ DIST stripe-10.0.0.tar.gz 1284985 BLAKE2B c2cde142b324fb622c7b7c3b967d01caf3a31c7832825b750e88ff7a4b8b41efe457c40ce329977f7df39b54ecf267812174a31682106aaecda78ebe53322467 SHA512 fa72997cde84a7fd871e9be53a560bce07041dddd9db7e37942b1c7cfaee8c2fd3a671f08f1b567b60aee017f7a6b9662dd2cfb3a06036bd9b0f3a03a395e0df DIST stripe-10.1.0.tar.gz 1290758 BLAKE2B 0ec51d9189b1d574eb1eb2eb7c3683b2b6b86c9879445c2de60da1a16684e0fe095abbe841cc59ea8daad6862d864550bfb5a9c9dd6a034df42a01c8ec59be4c SHA512 ecac8856ce6993ba5c339a44791b9197f2e1b8a62292d5e9e555e02004007ad90c400dff8d111df2ae1428436ba413a47b59ef9b5e9da445872495c45aa844c3 +DIST stripe-10.2.0.tar.gz 1297807 BLAKE2B 996636c7cca85295c7fbf5ec108cb6b62db11ebc26d8978329c437b55d5f15bd15936c1386a915deb9544bf4f5869440e13fc307962e1b796a7901b10d406595 SHA512 83ae38e4f53302fd16f1dce10f6e4336842ee81bbab272ebd9362e7bd0c7b03168e6de2ff14a0f2cbd332eaba9ed8dc2bf24894cfd5600d8a91cb5670c477fbe DIST stripe-9.10.0.tar.gz 1273670 BLAKE2B ebe42096846a124dea93744b26103dfc0a82f51191be612962258d7ab8c903e3da707dad3e35bafaa7431dd65a08234d9df5f9a614ff1959d86dc2d992ae7ad0 SHA512 f2a22534703add04512fa5ee124bd0ac48dd8a69dd19438260e9fce2cd00b659b9b014f76e325b6b0e51c79c157d15acb775d4ee4e1401a837d7e7dd81e81191 DIST stripe-9.12.0.tar.gz 1277151 BLAKE2B a23e490ac99f3814db204cd8ad71793b5da73a82c420823cecd87dad5f17c9dbe44a7dcdfbb519b5db4cb488f286e231029827bae25657c2bf4183d1c4dd8406 SHA512 c6c4a4cfeddda4c0e4042b31addea6885819304b469e4f7f701c894fca2d1ccca867dac511abf8d9dd9fc7cc135185387a5b55d37558b9355ee4add16b6318cb diff --git a/dev-python/stripe/stripe-10.2.0.ebuild b/dev-python/stripe/stripe-10.2.0.ebuild new file mode 100644 index 000000000000..7925c1fc5c50 --- /dev/null +++ b/dev-python/stripe/stripe-10.2.0.ebuild @@ -0,0 +1,88 @@ +# 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..13} 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.186.0 + dev-python/aiohttp[${PYTHON_USEDEP}] + dev-python/anyio[${PYTHON_USEDEP}] + dev-python/httpx[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + dev-python/trio[${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 + # https://github.com/stripe/stripe-python/pull/1297 + sed -e 's:from mock:from unittest.mock:' \ + -i tests/test_http_client.py || die + distutils-r1_src_prepare +} + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest tests -p anyio -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" +}