# Tests are enabled by default %bcond_without tests # Docs are enabled by default %bcond_without doc %global srcname molecule Name: python-%{srcname} Version: 3.6.1 Release: 1%{?dist} Summary: A tool designed to aid in the development and testing of Ansible roles # Most of the package is MIT licensed. # # There are two files in the archive that are licensed with ASL 2.0: # - src/molecule/interpolation.py # - src/molecule/test/unit/test_interpolation.py License: MIT and ASL 2.0 URL: https://github.com/ansible-community/%{srcname} Source0: %{pypi_source} Patch0: 0000-fix-shebang-issues.patch BuildArch: noarch BuildRequires: python-devel %if %{with tests} # Based off of the `test` extra in https://github.com/ansible-community/molecule/blob/main/setup.cfg. # `ansi2html`, `pytest-cov`, `pytest-html` and `pytest-plus` are deliberately excluded. # Make sure to check this manually after each update. BuildRequires: python3dist(pexpect) BuildRequires: python3dist(pytest-mock) BuildRequires: python3dist(pytest-testinfra) BuildRequires: python3dist(pytest-xdist) BuildRequires: python3dist(pytest) BuildRequires: python3dist(filelock) # This comes from the `lint` extra, but it is also necessary. BuildRequires: python3dist(yamllint) %endif %global _description %{expand: Molecule is designed to aid in the development and testing of Ansible roles. Molecule provides support for testing with multiple instances, operating systems and distributions, virtualization providers, test frameworks and testing scenarios. Molecule is opinionated in order to encourage an approach that results in consistently developed roles that are well-written, easily understood and maintained. Molecule uses Ansible playbooks to exercise the role and its associated tests. Molecule supports any provider that Ansible supports.} %description %{_description} %package doc Summary: Documentation for Molecule, a tool for testing Ansible roles # Follow Fedora Python Packaging Naming Guidelines # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming Provides: %{srcname}-doc = %{version}-%{release} %description doc This packages provides documentation for Molecule, a tool designed to aid in the development and testing of Ansible roles. %package -n python3-%{srcname} Summary: %{summary} # Follow Fedora Python Packaging Naming Guidelines # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming Provides: %{srcname} = %{version}-%{release} Requires: (python3dist(ansible-core) or python3dist(ansible)) Recommends: python-%{srcname}-doc Recommends: (python3dist(molecule-docker) or python3dist(molecule-podman)) %description -n python3-%{srcname} %{_description} %prep %autosetup -n %{srcname}-%{version} -p1 # Fix overly restrictive version constraints for Fedora 34. sed -i setup.cfg\ -e 's|Sphinx.*|Sphinx >= 3.4.3|'\ -e 's|sphinx-notfound-page >= 0.7.1|sphinx-notfound-page >= 0.6|'\ -e 's|click >= 8.0, < 9|click >= 7.1.2, < 9|'\ cat <> setup.cfg [files] data_files = %{python3_sitelib}/%{srcname}/cookiecutter = molecule/cookiecutter/* EOF %generate_buildrequires %pyproject_buildrequires -r %{?with_doc: -x docs} %build %pyproject_wheel %install %pyproject_install # This macro does not work for this project. # See https://bugzilla.redhat.com/show_bug.cgi?id=2023561 for more info. # %%pyproject_save_files %%{srcname} %if %{with doc} # Sphinx requires the dist-info to be present in order to build the docs. export PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitelib}}" # generate html docs sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %check %if %{with tests} %pytest %endif # %%files -n python3-%%{srcname} -f %%{pyproject_files} %files -n python3-%{srcname} %doc README.rst %license LICENSE %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}-%{version}.dist-info %{_bindir}/%{srcname} %{_bindir}/mol %if %{with doc} %files -n python-%{srcname}-doc %license LICENSE %doc README.rst %doc html/ %endif %changelog * Wed Feb 16 2022 Maxwell G - 3.6.1-1 - Update to 3.6.1. Fixes rhbz#2051469. * Wed Nov 24 2021 Maxwell G - 3.5.2-1 - Update to version 3.5.2. Fixes rhbz#2001406. - Fixes rhbz#2014592. - Implement new Fedora Python Packaging Guidelines - Fix package naming - Fix testing and remove python-mock - Fix rpmlint errors - Fix indentation - Fix docs * Wed Sep 01 2021 Chedi Toueiti - 3.4.0-1 - Update to version 3.4.0 (#1939754) * Fri Jul 23 2021 Fedora Release Engineering - 3.2.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jun 08 2021 Python Maint - 3.2.4-3 - Rebuilt for Python 3.10 * Fri Jun 04 2021 Python Maint - 3.2.4-2 - Bootstrap for Python 3.10 * Sun Mar 21 2021 Chedi Toueiti - 3.2.4-1 - Update to version 3.2.4 (#1939754) * Wed Feb 17 2021 Chedi Toueiti - 3.2.3-1 - update to version 3.2.1 (#1922542) * Wed Jan 27 2021 Fedora Release Engineering - 3.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Jan 21 2021 Chedi Toueiti - 3.2.2-1 - update to version 3.2.2 (#1914355) * Mon Jan 04 2021 Chedi Toueiti - 3.2.1-1 - update to version 3.2.1 (#1892112) * Mon Nov 23 2020 Chedi Toueiti - 3.1.5-2 - update dependency (python-testinfra) * Tue Oct 27 2020 Chedi Toueiti - 3.1.5-1 - update to 3.1.5 (#1876819) * Tue Oct 06 2020 Stefano Figura - 3.0.8-2 - add python3-libselinux dependency to ensure molecule works in Fedora toolbox * Thu Aug 20 2020 Chedi Toueiti - 3.0.8-1 - update to 3.0.8 * Tue Aug 18 2020 Chedi Toueiti - 3.0.7-1 - update to 3.0.7 * Sat Jul 18 2020 Chedi Toueiti - 3.0.6-1 - update to 3.0.6 * Wed Jul 08 2020 Ken Dreyer - 3.0.4-1 - update to 3.0.4 (rhbz#1822314) * Tue May 26 2020 Miro Hrončok - 3.0.2-7 - Rebuilt for Python 3.9 * Sat Apr 18 2020 Chedi Toueiti - 3.0.2-6 - adding new dependencies * Mon Feb 24 2020 Chedi Toueiti - 3.0.2 - update to 3.0.2 * Fri Feb 21 2020 Chedi Toueiti - 3.0.1 - update to 3.0.1 * Thu Jan 30 2020 Fedora Release Engineering - 2.22-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Mon Aug 26 2019 Chedi Toueiti - 2.22-1 - update to 2.22 * Mon Aug 19 2019 Miro Hrončok - 2.20.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Jul 01 2019 Juerg Ritter - 2.20.1-1 - update to 2.20.1 and disabled dependency generator * Sat Feb 02 2019 Fedora Release Engineering - 2.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Oct 23 2018 Brett Lentz - 2.19-1 - update to 2.19 * Thu Oct 11 2018 Miro Hrončok - 2.16-2 - Python2 binary package has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal * Tue Jul 17 2018 Brett Lentz - 2.16-1 - update to 2.16 * Sat Jul 14 2018 Fedora Release Engineering - 2.13.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 2.13.1-3 - Rebuilt for Python 3.7 * Fri May 11 2018 Brett Lentz - 2.13.1-2 - add Recommends for default use case * Wed May 9 2018 Brett Lentz - 2.13.1-1 - update to 2.13.1 - ensure all needed files are installed * Mon Apr 30 2018 Brett Lentz - 2.13-1 - update to 2.13 * Mon Apr 2 2018 Brett Lentz - 2.12.1-2 - update to 2.12.1 * Thu Mar 29 2018 Brett Lentz - 2.11-1 - update to 2.11 * Wed Mar 14 2018 Brett Lentz - 2.10.1-3 - fix package deps * Mon Mar 12 2018 Brett Lentz - 2.10.1-1 - update to 2.10.1 * Mon Mar 5 2018 Brett Lentz - 2.9-1 - update to 2.9 * Tue Jan 23 2018 Brett Lentz - 2.7-1 - initial package