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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E3044138334 for ; Sun, 11 Nov 2018 10:41:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D8D18E0AA2; Sun, 11 Nov 2018 10:41:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9DED1E0AA2 for ; Sun, 11 Nov 2018 10:41:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 29C7D335CF8 for ; Sun, 11 Nov 2018 10:41:32 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 531FE3DD for ; Sun, 11 Nov 2018 10:41:30 +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: <1541932884.69349e0bccbd11af42d0363e5fd0d2bda1421958.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-2.10.1.ebuild X-VCS-Directories: dev-python/stripe/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 69349e0bccbd11af42d0363e5fd0d2bda1421958 X-VCS-Branch: master Date: Sun, 11 Nov 2018 10:41:30 +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-Archives-Salt: 7a77a874-636f-4686-973b-3230931bbd10 X-Archives-Hash: 7197fedab2f02f60cd3eca30449d28c5 commit: 69349e0bccbd11af42d0363e5fd0d2bda1421958 Author: Michael Seifert digitalernachschub de> AuthorDate: Tue Oct 16 14:03:03 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Nov 11 10:41:24 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69349e0b dev-python/stripe: Version bump to v2.10.1. Closes: https://bugs.gentoo.org/668782 Signed-off-by: Michael Seifert digitalernachschub.de> Closes: https://github.com/gentoo/gentoo/pull/10156 Signed-off-by: Michał Górny gentoo.org> dev-python/stripe/Manifest | 1 + dev-python/stripe/stripe-2.10.1.ebuild | 68 ++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/dev-python/stripe/Manifest b/dev-python/stripe/Manifest index 0d0cf2ed1da..cd559ceb5e9 100644 --- a/dev-python/stripe/Manifest +++ b/dev-python/stripe/Manifest @@ -1,2 +1,3 @@ DIST stripe-1.84.2.tar.gz 213050 BLAKE2B df6c195a183d15bdeb7ffbfd2f5683b0b667e8a4df7a637d3960369e1b00a90c74bb5d97af64c553e2f250b2bb7bb698d015a65c3da312f74bc7b141c4b63dc5 SHA512 7d3e1a20c30b3c2fa087c9fe86b04462db4b6cd742ea13daae2754ee6b414656847057b30db48634c6d02ef01d8e510359505fab212325a3db36dfaf2d72db38 +DIST stripe-2.10.1.tar.gz 218299 BLAKE2B b1d836ef92dabfd5a5f292ede69264886dadb0b87b72927e444d615e9f0518efff513f34f2aaee778921f7cb68169f7981a5e84993b19221ec394a1d5c07c622 SHA512 877a87e848d425f333ad3e40c172010a3b1882de0894ff8c5c0623f5d09fbd7ab51d9d53ead8773d3680cdab8d07df32f4210abc08c796adf6feeb4014b671f7 DIST stripe-2.3.0.tar.gz 213813 BLAKE2B b383c724331d5ec21452aee2eee49c789e2503057c4648d9e879fc561b87cc70ba918bb1e620db3bca380150e62d41433f1bfa7f9b6f164731d3d68542d5f056 SHA512 ba88b18b7328d917379d8474373a1f87717d67cf305022b80eb05c74b8055b825cf30cc879c4e99dbe06dc99f03464649e637d83d70c902b84f5873dd0776453 diff --git a/dev-python/stripe/stripe-2.10.1.ebuild b/dev-python/stripe/stripe-2.10.1.ebuild new file mode 100644 index 00000000000..ebeb82c56f0 --- /dev/null +++ b/dev-python/stripe/stripe-2.10.1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy{,3} ) +inherit distutils-r1 + +DESCRIPTION="Stripe python bindings" +HOMEPAGE="https://github.com/stripe/stripe-python" +SRC_URI="mirror://pypi/s/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND=" + $(python_gen_cond_dep '>=dev-python/requests-2[${PYTHON_USEDEP}]' 'python3*' pypy3) + $(python_gen_cond_dep '>=dev-python/requests-2[ssl,${PYTHON_USEDEP}]' 'python2*' pypy) +" +# See https://github.com/stripe/stripe-python/blob/v2.10.1/tests/conftest.py#L17 +# for minimum required version of stripe-mock +DEPEND="${RDEPEND} + test? ( + >=dev-util/stripe-mock-0.33.0 + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + net-misc/curl + ) +" + +DOCS=(LONG_DESCRIPTION.rst CHANGELOG.md README.md) + +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 + + distutils-r1_src_test + + # Tear down stripe-mock + kill "${stripe_mock_pid}" || die "Unable to stop stripe-mock" +} + +python_test() { + STRIPE_MOCK_PORT=${stripe_mock_port} pytest -vv || die "Tests failed with ${EPYTHON}" +}