%global archive_name ansible-lint %global lib_name ansiblelint Name: %{archive_name} Version: 4.1.0 Release: 2%{?dist} Summary: Best practices checker for Ansible License: MIT URL: https://github.com/willthames/ansible-lint Source0: https://github.com/willthames/%{archive_name}/archive/v%{version}.tar.gz BuildArch: noarch %description Checks playbooks for practices and behavior that could potentially be improved. %package -n python3-%{archive_name} Summary: %summary BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-setuptools_scm_git_archive BuildRequires: ansible-python3 BuildRequires: python3-PyYAML BuildRequires: python3-six BuildRequires: python3-ruamel-yaml Requires: ansible Requires: python3-PyYAML Requires: python3-six %{?python_provide:%python_provide python3-%{archive_name}} Obsoletes: python2-%{archive_name} < 3.4.23-6 Provides: %{archive_name} = %{version}-%{release} Requires: python3-ruamel-yaml %description -n python3-%{archive_name} Python3 module for ansible-lint. %prep %autosetup -n %{archive_name}-%{version} %build %py3_build %install %py3_install # On newer releases, which only have Python 3, you will get: # ansible-lint => Python 3 # ansible-lint-3 => Python 3 (to avoid breaking anyone's scripts) ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-3 %check # Following sed execution is necessary for test/TestCommandLineInvocationSameAsConfig.py sed -i -e '/^#!/c\#!%{_bindir}/python3' bin/ansible-lint PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py test %files -n python3-%{archive_name} %doc README.rst ROADMAP.rst CHANGELOG.rst examples %license LICENSE %{_bindir}/%{name} %{_bindir}/%{name}-3 %{python3_sitelib}/%{lib_name} %{python3_sitelib}/ansible_lint-%{version}-py3.*.egg-info %changelog * Mon Oct 14 2019 Sandro Bonazzola - 4.1.0-2 - require ansible instead of ansible-python3 * Wed Oct 09 2019 Sandro Bonazzola - 4.1.0-1 - Initial import based on Fedora build ansible-lint-4.1.0-2.fc31 - Add missing Requires on python3-ruamel-yaml