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 62FB9158064 for ; Tue, 30 Apr 2024 00:20:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 48CFEE2A07; Tue, 30 Apr 2024 00:20:37 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1E305E2A07 for ; Tue, 30 Apr 2024 00:20: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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BFA3B340DE6 for ; Tue, 30 Apr 2024 00:20:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 14AFF16C0 for ; Tue, 30 Apr 2024 00:20:34 +0000 (UTC) From: "Kyle Elbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kyle Elbert" Message-ID: <1714436386.87a7c32ad4ad1052868f0638334bc4ce70796b88.kcelbert@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/cloudflare/ X-VCS-Repository: repo/proj/guru X-VCS-Files: dev-python/cloudflare/Manifest dev-python/cloudflare/cloudflare-2.19.4.ebuild X-VCS-Directories: dev-python/cloudflare/ X-VCS-Committer: kcelbert X-VCS-Committer-Name: Kyle Elbert X-VCS-Revision: 87a7c32ad4ad1052868f0638334bc4ce70796b88 X-VCS-Branch: dev Date: Tue, 30 Apr 2024 00:20:34 +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: 4826a80e-422a-480b-9dc7-ea7d694b6814 X-Archives-Hash: fd1e29463e2075331e103f165cb8b1a9 commit: 87a7c32ad4ad1052868f0638334bc4ce70796b88 Author: Kyle Elbert gmail com> AuthorDate: Tue Apr 30 00:19:46 2024 +0000 Commit: Kyle Elbert gmail com> CommitDate: Tue Apr 30 00:19:46 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=87a7c32a dev-python/cloudflare: add 2.19.4 Signed-off-by: Kyle Elbert gmail.com> dev-python/cloudflare/Manifest | 1 + dev-python/cloudflare/cloudflare-2.19.4.ebuild | 70 ++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/dev-python/cloudflare/Manifest b/dev-python/cloudflare/Manifest index 32f976d4d6..84a9ae7abf 100644 --- a/dev-python/cloudflare/Manifest +++ b/dev-python/cloudflare/Manifest @@ -1 +1,2 @@ DIST cloudflare-2.19.2.gh.tar.gz 145051 BLAKE2B cd7c9d9352b055b115af443341dcc4d0a446aaf1ac7b7f8030dce0ff19da185b1effc9a679b8018920ade98cafaaf599af8aea8c57a924e59eb40670a3854b70 SHA512 eac9601f9cb9ea5dc140e48fb0f0e042396f6a7ec354f18b815d6c51094799dc3f25e1e69e78f87ec5c612f4304d15f779090962a8f96282d9b2fe8a9abfb690 +DIST cloudflare-2.19.4.gh.tar.gz 151397 BLAKE2B c91c95f52314c5177d823ef8f827ea2f76f6cc703260449aea12d54c1b77d061feca15d4bb845f84cfb4fd80789e5064e54d7530daf546d54d17054b9e0b4fda SHA512 8ae11e73760c57b610abfe5e2c8fdc83c2e0b9e07340884925ec9ac3bf5b40b4edf39b2b8ce7330538369d7573146a2ddac195efb0efb4ff657f75fdacb31aed diff --git a/dev-python/cloudflare/cloudflare-2.19.4.ebuild b/dev-python/cloudflare/cloudflare-2.19.4.ebuild new file mode 100644 index 0000000000..c4a3c1cb13 --- /dev/null +++ b/dev-python/cloudflare/cloudflare-2.19.4.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +DISTUTILS_USE_PEP517="setuptools" +inherit distutils-r1 + +DESCRIPTION="Python wrapper for the Cloudflare v4 API" +HOMEPAGE="https://pypi.org/project/cloudflare/" +#SRC_URI="https://files.pythonhosted.org/packages/9b/8c/973e3726c2aa73821bb4272717c6f9f6fc74e69d41ba871bdf97fc671782/${P}.tar.gz" +#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/cloudflare/python-cloudflare/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/python-${P}" +LICENSE="MIT" +SLOT="0" +DEPEND="dev-python/jsonlines[${PYTHON_USEDEP}]" +RDEPEND="( ${DEPEND} + dev-python/requests[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] )" +PROPERTIES="test_network" #actually sends many test requests +distutils_enable_tests pytest +KEYWORDS="~amd64 ~arm64" +RESTRICT="test mirror" #mirror restricted only because overlay + +python_prepare_all() { + # don't install tests or examples + sed -i -e "s/'cli4', 'examples'/'cli4'/" \ + -e "s#'CloudFlare/tests',##" \ + setup.py || die + sed -i -e "/def test_ips7_should_fail():/i@pytest.mark.xfail(reason='Now fails upstream')" \ + -e "2s/^/import pytest/" \ + CloudFlare/tests/test_cloudflare_calls.py || die + distutils-r1_python_prepare_all +} +python_test() { + pushd CloudFlare/tests + if [ -z "${CLOUDFLARE_API_TOKEN}" ]; then + ewarn "Skipping some tests which require an actual cloudflare api token" + ewarn "To run them, provide the token in the environment variable CLOUDFLARE_API_TOKEN" + ewarn "The permissions needed are zone dns edit and user details read" + local EPYTEST_IGNORE=('test_dns_records.py' 'test_radar_returning_csv.py' + 'test_dns_import_export.py' 'test_load_balancers.py' 'test_log_received.py' + 'test_rulesets.py' 'test_urlscanner.py' 'test_paging_thru_zones.py' + 'test_purge_cache.py' + 'test_graphql.py' 'test_waiting_room.py' 'test_workers.py' 'test_cloudflare_calls.py' ) + # these test(s) need an api key/token setup + # Permissions needed are zone dns edit and user details read, account worker scripts edit, + # zone analytics read, zone load balancer edit, account ruleset edit, zone firewall edit + # account url scanner edit, zone waiting room edit, zone cache purge + fi + # Not sure what permissions/tokens/whatever this test needs, maybe both a token and old api login + # tried several of the ssl related options for the cert test but no luck either + # Tried several of the prefex related options to try to get loa docs working but nope + local EPYTEST_IGNORE+=('test_images_v2_direct_upload.py' 'test_issue114.py' + 'test_certificates.py' 'test_loa_documents.py' + 'test_load_balancers.py' 'test_rulesets.py') + # maybe needs a paid plan or just some unknown permission + local EPYTEST_DESELECT=( + 'test_load_balancers.py::test_load_balancers_list_regions' + 'test_load_balancers_get_regions' + 'test_load_balancers.py::test_load_balancers_search' + 'test_load_balancers.py::test_load_balancers_pools' + 'test_rulesets.py::test_zones_ruleset_post' + 'test_rulesets.py::test_zones_rulesets_get_specific' + 'test_rulesets.py::test_zones_ruleset_delete' + ) + epytest +}