diff options
| author | Crucible <crucible@localhost> | 2026-10-07 03:05:00 -0500 |
|---|---|---|
| committer | Crucible <crucible@localhost> | 2026-10-07 03:05:00 -0500 |
| commit | 4f8f07779b4dd78123821b104e43fd1eb15281dd (patch) | |
| tree | 50283d655e8953ffa4cd36a42b39f72f09fed20b /dev-python/cloudflare/cloudflare-5.9.0.ebuild | |
| parent | 21cec7ace42ae94a3a1b32ecec396a199eebf3c9 (diff) | |
| download | srcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.tar.gz srcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.tar.xz srcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.zip | |
Publish srcux candidate 0000000583-20261007-030305
Diffstat (limited to 'dev-python/cloudflare/cloudflare-5.9.0.ebuild')
| -rw-r--r-- | dev-python/cloudflare/cloudflare-5.9.0.ebuild | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/dev-python/cloudflare/cloudflare-5.9.0.ebuild b/dev-python/cloudflare/cloudflare-5.9.0.ebuild new file mode 100644 index 000000000000..91178d3868b1 --- /dev/null +++ b/dev-python/cloudflare/cloudflare-5.9.0.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 eapi9-ver + +MY_PV=$(ver_rs 3 -) +MY_P="cloudflare-python-${MY_PV}" +DESCRIPTION="The official Python library for the Cloudflare API" +HOMEPAGE=" + https://github.com/cloudflare/cloudflare-python + https://pypi.org/project/cloudflare/ +" +SRC_URI=" + https://github.com/cloudflare/cloudflare-python/archive/refs/tags/v${MY_PV}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S="${WORKDIR}/${MY_P}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +PROPERTIES="test? ( test_network )" + +# Note for maintainers: watch follow issue to switch for httpx2 +# https://github.com/cloudflare/cloudflare-python/issues/2733 +RDEPEND=" + >=dev-python/anyio-3.5.0[${PYTHON_USEDEP}] + <dev-python/anyio-5[${PYTHON_USEDEP}] + >=dev-python/distro-1.7.0[${PYTHON_USEDEP}] + <dev-python/distro-2[${PYTHON_USEDEP}] + >=dev-python/httpx-0.23.0[${PYTHON_USEDEP}] + <dev-python/httpx-1[${PYTHON_USEDEP}] + >=dev-python/pydantic-1.9.0[${PYTHON_USEDEP}] + <dev-python/pydantic-3[${PYTHON_USEDEP}] + dev-python/sniffio[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.14[${PYTHON_USEDEP}] + <dev-python/typing-extensions-5[${PYTHON_USEDEP}] +" + +# tests/api_resources needs the prism mock server (@stainless-api/prism-cli), +# an npm package that is not in the tree. Everything else is either pure unit +# tests or mocked with respx. +BDEPEND+=" + test? ( + >=dev-python/dirty-equals-0.6.0[${PYTHON_USEDEP}] + >=dev-python/httpx-aiohttp-0.1.9[${PYTHON_USEDEP}] + ) +" + +EPYTEST_PLUGINS=( pytest-asyncio respx ) +distutils_enable_tests pytest + +EPYTEST_IGNORE=( tests/api_resources ) +# The generated tests expect a CLOUDFLARE_API_VERSION environment variable and +# api_version format validation that the generated client does not implement. +# https://github.com/cloudflare/cloudflare-python/issues/2745 +EPYTEST_DESELECT=( + tests/test_client.py::TestAsyncCloudflare::test_api_version_env_var + tests/test_client.py::TestAsyncCloudflare::test_api_version_omitted_when_empty + tests/test_client.py::TestAsyncCloudflare::test_api_version_rejects_invalid_format + tests/test_client.py::TestCloudflare::test_api_version_env_var + tests/test_client.py::TestCloudflare::test_api_version_omitted_when_empty + tests/test_client.py::TestCloudflare::test_api_version_rejects_invalid_format +) + +src_prepare() { + distutils-r1_src_prepare + + # Drop -n auto, pytest-xdist is not worth pulling in for a 10 s suite + sed -i -e '/^addopts = /d' pyproject.toml || die +} |
