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 C4704158451 for ; Sat, 13 Jan 2024 08:20:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68FA0E2A21; Sat, 13 Jan 2024 08:20:16 +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 4B918E2A21 for ; Sat, 13 Jan 2024 08:20:16 +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 51A463430F1 for ; Sat, 13 Jan 2024 08:20:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9B78214C9 for ; Sat, 13 Jan 2024 08:20:11 +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: <1705134001.fa930b1621b10c6960a0cf86ffc75133a2ec8e24.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-7.12.0.ebuild X-VCS-Directories: dev-python/stripe/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: fa930b1621b10c6960a0cf86ffc75133a2ec8e24 X-VCS-Branch: master Date: Sat, 13 Jan 2024 08:20:11 +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: 10747d79-2cb4-4036-9dc2-ee763cf14590 X-Archives-Hash: eb0cfb2d2dd66f0c4b8c7cd95890464c commit: fa930b1621b10c6960a0cf86ffc75133a2ec8e24 Author: Michał Górny gentoo org> AuthorDate: Sat Jan 13 07:09:29 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Jan 13 08:20:01 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa930b16 dev-python/stripe: Bump to 7.12.0 Signed-off-by: Michał Górny gentoo.org> dev-python/stripe/Manifest | 1 + dev-python/stripe/stripe-7.12.0.ebuild | 81 ++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 84cc388d1537..9c97b813994f 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,2 +1,3 @@ DIST stripe-7.10.0.tar.gz 783205 BLAKE2B ab06c4f81bd3f2492a1e5982995f5205f345f395b8cc7e470a22af62d57421789208c76097a08019550a61ab65b41ea24305bd303a9e3d6e3cb791fe552bcbc7 SHA512 dbdfd2ca11f592caa31fb53b0204e64292d4471d5d3e607447bbcfabe24db684331d77f0ff12da77ec5c4ad20709328a7366eb55b9c3d804ca39442971cefcde DIST stripe-7.11.0.tar.gz 783456 BLAKE2B 9317526b9c19d98b921f3fa8222486537b3bfa3a9c239d83098be1d9856a258a67276690c1f1ced6087a8d7f1fb180240f737d67f9ded5605e82de7fc4355fc0 SHA512 5cfa650d43745c8a3ab5588f30c6eaab0952aff060b9fdb84027db3422c88002d074eb29b3e2a40ed1457be6e8cd883b3323e8da538af0991114a10976b86842 +DIST stripe-7.12.0.tar.gz 783948 BLAKE2B 063df7bbc118847bdee35f2919bd8023f4d58b5f1a36ad9d81dd63b6771513e3323a50ce8f83bb1719d6a44e6e823384a908af9b2091fb7c27a7bf78e5e22b40 SHA512 819aa9f4ec1d7269d14d43abd2c4ec7b20b76bdd4f290962ac51b89926ab2e1f1644dd9c653556673b7a65e97510e6d588052fcc4a7e3c05464a0564bb8d8ed0 diff --git a/dev-python/stripe/stripe-7.12.0.ebuild b/dev-python/stripe/stripe-7.12.0.ebuild new file mode 100644 index 000000000000..e5d81167c1c1 --- /dev/null +++ b/dev-python/stripe/stripe-7.12.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.180.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" +}