I dont know what the following error means. According to this link the %python_provide tag should be valid
[root@ip-10-114-62-15 ~]# rpmbuild -ba rpmbuild/SPECS/ansible.spec
error: line 29: Unknown tag: %python_provide: ERROR: python3-ansible not recognized.
[root@ip-10-114-62-15 ~]# cat rpmbuild/SPECS/ansible.spec
# Created by pyp2rpm-3.3.7
%global pypi_name ansible
%global pypi_version 4.5.0
%global pypi_source ansible-4.5.0.tar.gz
Name: python-%{pypi_name}
Version: %{pypi_version}
Release: 1%{?dist}
Summary: Radically simple IT automation
License: GPLv3+
URL: https://ansible.com/
Source0: %{pypi_source}
BuildRequires: python3-devel
BuildRequires: python3dist(ansible-core) >= 2.11.4 with python3dist(ansible-core) < 2.12
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(sphinx)
%description
|PyPI version| |Docs badge| |Chat badge| |Build Status| |Code Of Conduct|
|Mailing Lists| |License|**************Ansible is a radically simple IT
automation system. It handles configuration management, application deployment,
cloud provisioning, ad-hoc task execution, network automation, and multi-node
orchestration. Ansible makes complex changes like zero-downtime rolling updates
with load...
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
Requires: (python3dist(ansible-core) >= 2.11.4 with python3dist(ansible-core) < 2.12)
%description -n python3-%{pypi_name}
|PyPI version| |Docs badge| |Chat badge| |Build Status| |Code Of Conduct|
|Mailing Lists| |License|**************Ansible is a radically simple IT
automation system. It handles configuration management, application deployment,
cloud provisioning, ad-hoc task execution, network automation, and multi-node
orchestration. Ansible makes complex changes like zero-downtime rolling updates
with load...
%package -n python-%{pypi_name}-doc
Summary: ansible documentation
%description -n python-%{pypi_name}-doc
Documentation for ansible
%prep
%autosetup -n %{pypi_name}-%{pypi_version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
# generate html docs
PYTHONPATH=${PWD} sphinx-build-3 ansible_collections/sensu/sensu_go/docs/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py3_install
%check
%{__python3} setup.py test