# 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_{12..14} ) inherit distutils-r1 pypi DESCRIPTION="The official Python library for the OpenAI API" HOMEPAGE=" https://github.com/openai/openai-python https://pypi.org/project/openai/ " LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~arm64" # Upstream extras mapped to USE flags. Three extras are deliberately NOT # exposed because at least one of their packages is missing from ::gentoo and # ::bentoo -- a USE flag nobody can enable is worse than no flag at all: # datalib -> dev-python/pandas-stubs is not packaged (numpy and pandas # are, so only the type stubs are blocking this one). # realtime -> upstream pins websockets>=13,<16 and the only versions in # ::gentoo are >=16.0, so the range is unsatisfiable. # voice-helpers -> dev-python/sounddevice is not packaged. IUSE="aiohttp bedrock" RDEPEND=" >=dev-python/anyio-4.10.0[${PYTHON_USEDEP}] =dev-python/distro-1.7.0[${PYTHON_USEDEP}] =dev-python/httpx2-2.7.0[${PYTHON_USEDEP}] =dev-python/jiter-0.10.0[${PYTHON_USEDEP}] =dev-python/pydantic-1.9.0[${PYTHON_USEDEP}] dev-python/tqdm-4-r0[${PYTHON_USEDEP}] >=dev-python/typing-extensions-4.14[${PYTHON_USEDEP}] =dev-python/aiohttp-3.14.1[${PYTHON_USEDEP}] ) bedrock? ( >=dev-python/botocore-1.40.0[${PYTHON_USEDEP}]