%global srcname instructor %global _description %{summary}. Name: python-%{srcname} Version: 1.4.3 Release: %autorelease Summary: structured outputs for llm License: MIT URL: https://github.com/jxnl/instructor Source: %{url}/archive/refs/tags/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel # For tests BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-asyncio) %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %autosetup -p1 -n %{srcname}-%{version} # Allow slightly older dependencies. sed -i \ -e 's/docstring-parser = "^0.16"/docstring-parser = "^0.15"/' \ -e 's/tenacity = "^8.4.1"/tenacity = "^8.2.3"/' \ pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check # Import checks and pytest tests are dependent on API variables # being set and all extras being built. %files -n python3-%{srcname} -f %{pyproject_files} %{_bindir}/instructor %changelog %autochangelog