%global srcname ansible-compat %global pkgname python-ansible-compat # Do not create seperate docs directory for doc subpackage %global _docdir_fmt python3-%{srcname} # Sphinx version is too old on Fedora 35 and below. %bcond_without doc %bcond_without test Name: %{pkgname} Version: 1.0.0 Release: 1%{?dist} Summary: Ansible python helper functions URL: https://github.com/ansible-community/ansible-compat Source0: %{pypi_source} License: MIT BuildArch: noarch # This patch skips the tests requiring a connection to # ansible galaxy Patch0: 0001_skip_tests_requiring_network_connectivity.patch BuildRequires: python3-devel %description A python package containing functions that help interacting with various versions of Ansible %package doc Summary: %summary %description doc Documentation for python-ansible-compat %package -n python3-%{srcname} Summary: %summary %description -n python3-%{srcname} A python package containing functions that help interacting with various versions of Ansible %prep %autosetup -p1 -n %{srcname}-%{version} sed -i docs/requirements.* \ -e '/sphinx-autobuild/d' \ -e 's/^sphinx>=.*$/sphinx/' %generate_buildrequires %pyproject_buildrequires -r %{?with_doc: docs/requirements.in} %if %{with test} echo ansible-core echo 'python3dist(flaky)' echo 'python3dist(pyyaml)' echo 'python3dist(pytest)' echo 'python3dist(pytest-mock)' %endif %build %pyproject_wheel %if %{with doc} PYTHONPATH=src sphinx-build-3 docs html rm -rf html/.{doctrees,buildinfo} %endif %install %pyproject_install %pyproject_save_files ansible_compat %check %if %{with test} %pytest %endif %files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE %doc README.md %if %{with doc} %files doc %license LICENSE %doc html/ %endif %changelog * Wed Feb 16 2022 Maxwell G - 1.0.0-1 - Update to 1.0.0. Fixes rhbz#2036272. - Remove explicit dependencies that are already autogenerated. - Migrate to new Python Packaging Guidelines. - Enable docs building. * Fri Jan 21 2022 Fedora Release Engineering - 0.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Sep 01 2021 Chedi Toueiti - 0.5.0-1 - Initial commit version 0.5.0