mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
dev-python/cloudflare: drop 4.1.0
Signed-off-by: Kyle Elbert <kcelbert@gmail.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
DIST cloudflare-2.19.4.gh.tar.gz 151397 BLAKE2B c91c95f52314c5177d823ef8f827ea2f76f6cc703260449aea12d54c1b77d061feca15d4bb845f84cfb4fd80789e5064e54d7530daf546d54d17054b9e0b4fda SHA512 8ae11e73760c57b610abfe5e2c8fdc83c2e0b9e07340884925ec9ac3bf5b40b4edf39b2b8ce7330538369d7573146a2ddac195efb0efb4ff657f75fdacb31aed
|
||||
DIST cloudflare-4.1.0.gh.tar.gz 1919098 BLAKE2B 00282a75357e1b6368b9c36f9abdf52547d42850f74c52d0cd2b1b02b26a717942167db59ba025eb1a6e874697299c79257c8e796874abcc742a9350374e2511 SHA512 bc61518791adc30b472b64407f336f5dd94ad5961c7c1fa474750b8d2579411db78592dd30ac731b05023c29105928bda0005185b07d54cf8b88f100eb1bf5ca
|
||||
DIST cloudflare-4.2.0.gh.tar.gz 1995070 BLAKE2B 0c5fc330a0aa5557c7ca39f49e2d94b93b7a6eac16752dcf7d4ff96f9464176831f989e13f54a988d8a2afdddf21fcec43944ab125291eb38b9ed0b0db62331a SHA512 0aa994d4109ab819a3e5d190863bde7ef657b0582350f530cea3dc9de4cb34a99f00e23413f35b4a484c75c8e88c184bde59c8e91354dffbdc558645270a21a1
|
||||
DIST cloudflare-4.3.1.gh.tar.gz 2025113 BLAKE2B 05020324460b8857d21b2aac16e4c7fe316d5ad0bc0999a4c67e276d258cfd2cc4c85aa0fe82ed67931a2b02a3b90d39d9fd04eb3a6f8647a750bafdbe92e8a7 SHA512 36865ab8e88b2eaa3e0a5ad353db45bce55f166a96860f044bd88750de6a08a489e92492c721972be5582de551f31ba154ee6dccd386ca1b73c10864d185539a
|
||||
DIST cloudflare-python-4.1.0-prism.tar.gz 10768260 BLAKE2B baf23e1010417b770a7c26f7e806305a6431c917df527feb7277f72e35220e210b570cc67791fca911b450b0056c9d10824f6f90893abd6bd4b9bef933b4088d SHA512 05742179f53ce22bb9d3318069415bba9e94110ba14ea6a0eda991107c448fe35fb653d2863c4e3421e1062be2c8a963d2cc6bbe1187d9057378d144ce1fb3ac
|
||||
DIST cloudflare-python-4.2.0-prism.tar.gz 10827264 BLAKE2B e2231d8652fd0e33f1098687532520b7b24a7eec6e213470c8063f2fe306437f216c82cd62af23fec650224124fc161d85f4c098161dd4a9bc425c2a52da0e45 SHA512 68a5e15b7922752f600d5a02773dd6c683dcdcf12895dc80c3d16aeab52e302f9a90ab4fc4cc123374db74acaef5cd6618ac052dab8f8932206837f7f862556a
|
||||
DIST cloudflare-python-4.3.1-prism.tar.gz 10857296 BLAKE2B b22423b4cc641243517de470c86597a13faab5aa3caa3bc6ffa2a1bcd53ae72ffdebc0eb7f693911ab4b36adf46afb8216bcb9e76085f85147b866c532147757 SHA512 5df269b007905518c5fa500d21ebabc3ec5ee06160a1454ba080c1dd0feb6c7e65a8f3684ec243e15eb28c7e4ac91c2861f83d5314576985501ae64645b70e94
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
# upstream doesn't yet officially claim 3.13 support but passes tests and works
|
||||
DISTUTILS_USE_PEP517="hatchling"
|
||||
inherit distutils-r1
|
||||
DESCRIPTION="Python wrapper for the Cloudflare v4 API"
|
||||
HOMEPAGE="https://pypi.org/project/cloudflare/"
|
||||
if [ "${PV}" == 9999 ]; then
|
||||
EGIT_REPO_URI="https://github.com/cloudflare/cloudflare-python"
|
||||
inherit git-r3
|
||||
else
|
||||
MYPV=$(ver_rs 3 -)
|
||||
MYPV=${MYPV/beta/beta.}
|
||||
MYPN="cloudflare-python"
|
||||
SRC_URI="https://github.com/cloudflare/cloudflare-python/archive/refs/tags/v${MYPV}.tar.gz -> ${P}.gh.tar.gz
|
||||
test? ( https://github.com/Phoenix591/${MYPN}/releases/download/${PV}/${MYPN}-${PV}-prism.tar.gz )"
|
||||
#Prism archive generated by workflow
|
||||
# https://github.com/Phoenix591/cloudflare-python/blob/master/.github/workflows/test-tar.yml
|
||||
S="${WORKDIR}/${MYPN}-${MYPV}"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
fi
|
||||
LICENSE="MIT test? ( ISC Apache-2.0 MIT BSD CC0-1.0 0BSD )"
|
||||
# nodejs module and deps used to test
|
||||
SLOT="0"
|
||||
RDEPEND=" ${DEPEND}
|
||||
>=dev-python/httpx-0.23.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pydantic-2.9.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/typing-extensions-4.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/anyio-4.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/distro-1.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/sniffio-1.3.1[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
BDEPEND="test? (
|
||||
>=net-libs/nodejs-18.20.1
|
||||
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
|
||||
dev-python/time-machine[${PYTHON_USEDEP}]
|
||||
dev-python/dirty-equals[${PYTHON_USEDEP}]
|
||||
dev-python/respx[${PYTHON_USEDEP}]
|
||||
${RDEPEND}
|
||||
)"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
RESTRICT+=" !test? ( test )"
|
||||
|
||||
src_unpack() {
|
||||
unpack "${P}.gh.tar.gz"
|
||||
use test && cd "${S}" && unpack "cloudflare-python-${PV}-prism.tar.gz"
|
||||
}
|
||||
|
||||
#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() {
|
||||
# these 2 tests fail in an ebuild environment for some reason
|
||||
# help appreciated
|
||||
local EPYTEST_DESELECT=(
|
||||
tests/test_client.py::TestCloudflare::test_validate_headers
|
||||
tests/test_client.py::TestAsyncCloudflare::test_validate_headers )
|
||||
#intermittently fail for unknown reasons, passed along to upstream
|
||||
EPYTEST_DESELECT+=(
|
||||
tests/test_client.py::TestAsyncCloudflare::test_copy_build_request
|
||||
tests/test_client.py::TestCloudflare::test_copy_build_request
|
||||
tests/test_client.py::TestAsyncCloudflare::test_get_platform
|
||||
)
|
||||
epytest
|
||||
}
|
||||
|
||||
src_test() {
|
||||
start_mock
|
||||
distutils-r1_src_test
|
||||
stop_mock
|
||||
}
|
||||
start_mock() {
|
||||
# Run prism mock api server, this is what needs nodejs
|
||||
node --no-warnings node_modules/@stainless-api/prism-cli/dist/index.js mock \
|
||||
"cloudflare-spec.yml" >prism.log || die "Failed starting prism" &
|
||||
echo $! >"${T}/mock.pid" || die
|
||||
# Wait for server to come online
|
||||
echo -n "Waiting for mockserver"
|
||||
while ! grep -q "✖ fatal\|Prism is listening" "prism.log" ; do
|
||||
echo -n "." || die
|
||||
sleep 0.5
|
||||
done
|
||||
if grep -q "✖ fatal" prism.log; then
|
||||
die "Prism mock server failed"
|
||||
fi
|
||||
}
|
||||
stop_mock() {
|
||||
kill $(cat "${T}/mock.pid") || die
|
||||
}
|
||||
Reference in New Issue
Block a user