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 46CA7158015 for ; Sat, 23 Dec 2023 05:12:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73EB92BC07B; Sat, 23 Dec 2023 05:12:42 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 35F262BC05C for ; Sat, 23 Dec 2023 05:12:42 +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 7FB27342FFD for ; Sat, 23 Dec 2023 05:12:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BD8FD14B7 for ; Sat, 23 Dec 2023 05:12:38 +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: <1703308353.f7aa0a59da361bd1b7c799cd0c4db5b93d2a95cb.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.10.0.ebuild X-VCS-Directories: dev-python/stripe/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: f7aa0a59da361bd1b7c799cd0c4db5b93d2a95cb X-VCS-Branch: master Date: Sat, 23 Dec 2023 05:12:38 +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: 463aba64-49eb-483c-b367-2f473f773f0b X-Archives-Hash: 9a440eba2f56857782b9ce890d1e7cde commit: f7aa0a59da361bd1b7c799cd0c4db5b93d2a95cb Author: Michał Górny gentoo org> AuthorDate: Sat Dec 23 04:44:39 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Dec 23 05:12:33 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7aa0a59 dev-python/stripe: Bump to 7.10.0 Signed-off-by: Michał Górny gentoo.org> dev-python/stripe/Manifest | 1 + dev-python/stripe/stripe-7.10.0.ebuild | 81 ++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 5d07420b9728..ea8a69b49fa1 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,3 +1,4 @@ +DIST stripe-7.10.0.tar.gz 783205 BLAKE2B ab06c4f81bd3f2492a1e5982995f5205f345f395b8cc7e470a22af62d57421789208c76097a08019550a61ab65b41ea24305bd303a9e3d6e3cb791fe552bcbc7 SHA512 dbdfd2ca11f592caa31fb53b0204e64292d4471d5d3e607447bbcfabe24db684331d77f0ff12da77ec5c4ad20709328a7366eb55b9c3d804ca39442971cefcde DIST stripe-7.7.0.tar.gz 747906 BLAKE2B 40d6f4cdbefef54df8aa84529c879f9cfe3b36fafb35cdc12e98513ae63e3fc41a38174def79adf2e891445502771437489f73010b206a005a02883ef51400fd SHA512 988bf67fce52c5b48e8a7d0d6dac408fd5bc1bd3cbd0d80b06ab5b7b8c44a5daa231c6f3f5e563cea2a717cbec56ae4a83eac9526a463074ff3d1d2cb68a6b92 DIST stripe-7.8.1.tar.gz 768885 BLAKE2B 4e38fec0751fe7314e42303230d602b5f16daa40d833c749c29fa68cdd954cb604a2a0bcc7527253852499920ab5981629ca325d739fc56330bac4ab31b2bbd4 SHA512 cbee9cc0133fa18efa6582da032685fa44cd0446a2d032015410ca60a68ae5ce4a6dc5f82cedb24b1acc09a3c638e0f59f85e72798ee55603039b6fad27fe98e DIST stripe-7.8.2.tar.gz 769204 BLAKE2B 44a6d49ab79c0ea7854000502b55445d3ec691152a4bd4a9615095d8605df35ff4f3e3de1a69c2e45c8c4dc773ee626aab61680cafb92cf9a6b34f2f9f5523ef SHA512 7fddb1d668d921bf557a788427c7d7ecf7d47fba06a40185cc31c64ebfac858728654e1c4fbeff4bd76687a693951eec6791d833bc285aba23f352ec04260071 diff --git a/dev-python/stripe/stripe-7.10.0.ebuild b/dev-python/stripe/stripe-7.10.0.ebuild new file mode 100644 index 000000000000..64d63971109d --- /dev/null +++ b/dev-python/stripe/stripe-7.10.0.ebuild @@ -0,0 +1,81 @@ +# 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_{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.179.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" +}