%global pypi_name openai %global pypi_version 1.6.1 Name: python-%{pypi_name} Version: %{pypi_version} Release: 1%{?dist} Summary: The official Python library for the OpenAI API License: Apache-2.0 URL: https://github.com/openai/openai-python Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{pypi_name}-%{pypi_version}.tar.gz BuildArch: noarch BuildRequires: python3-devel %description The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.7+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx. %package -n python3-%{pypi_name} Summary: The official Python library for the OpenAI API %description -n python3-%{pypi_name} The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.7+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx. %prep %autosetup -n %{pypi_name}-python-%{pypi_version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{_bindir}/openai %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{pypi_version}.dist-info %changelog * Fri Dec 22 2023 Tom Rix - 0.7.0-1 - Initial package.