## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname openai Name: python-%{srcname} Version: 1.95.1 Release: %autorelease Summary: The official Python library for the OpenAI API License: Apache-2.0 URL: https://github.com/openai/openai-python Source: %{pypi_source} # Patch to relax hatchling version requirement Patch1: 0001-Relax-hatchling-requirement.patch BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx. It is generated from OpenAI's OpenAPI specification with Stainless.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description # Include realtime support subpackage for WebSocket connections %pyproject_extras_subpkg -n python3-%{srcname} realtime # The "aiohttp", "datalib" and "voice_helpers" extras are not available on # Fedora due to missing dependencies on "httpx_aiohttp", "pandas-stubs" and # "sounddevice", respectively. We are skipping them for now. %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %check # Run import tests to verify the package can be imported %pyproject_check_import %{srcname} -e openai.helpers -e openai.helpers.* # Note: Full test suite requires network access and API keys # so we only run basic import tests %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md CHANGELOG.md CONTRIBUTING.md %license LICENSE %{_bindir}/openai %changelog ## START: Generated by rpmautospec * Fri Jul 18 2025 Stephen Gallagher - 1.95.1-3 - Include 'realtime' beta client * Fri Jul 18 2025 Stephen Gallagher - 1.95.1-2 - Use rpmautospec * Mon Jul 14 2025 Stephen Gallagher - 1.95.1-1 - Initial package ## END: Generated by rpmautospec