## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname molecule %global pkgname python-molecule %global forgeurl https://github.com/ansible/%{srcname} %global common_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. } %global documentation_description %{expand: Documentation for python-molecule a tool designed to aid in the development and testing of Ansible roles. } %bcond_without doc %bcond_without tests Name: %{pkgname} Version: 4.0.4 Release: %autorelease Summary: Molecule is designed to aid in the development and testing of Ansible roles URL: %{forgeurl} Source: %{pypi_source molecule} # Remove unnecessary test deps and sphinx pinning Patch: 0001-Remove-Sphinx-pinning-and-unneeded-test-deps.patch BuildArch: noarch ######################################################################## # Most of the package is MIT licensed. # # # # There are two files in the archive that are licensed with ASL 2.0: # # - molecule-2.7/molecule/interpolation.py # # - molecule-2.7/test/unit/test_interpolation.py # ######################################################################## License: MIT AND Apache-2.0 BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %if %{with tests} BuildRequires: yamllint BuildRequires: python3dist(ansible-lint) %endif %description %{common_description} ######################################################################## # Documentation package # ######################################################################## %package -n python3-%{srcname}-doc Summary: %summary %description -n python3-%{srcname}-doc %{documentation_description} ######################################################################## # Python package # ######################################################################## %package -n python3-%{srcname} Summary: %summary Provides: molecule = %{version}-%{release} Requires: ansible-core Recommends: python-molecule-doc Recommends: python3dist(molecule-docker) Recommends: python3dist(molecule-podman) %description -n python3-%{srcname} %{common_description} %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %{?with_tests:-x test} %{?with_doc:-x docs} %build %pyproject_wheel %if %{with doc} PYTHONPATH=src sphinx-build-3 docs html rm -rf html/.{doctrees,buildinfo} %endif %install %pyproject_install %if %{with tests} %check # Python 3.11.1 and later emit a deprecation warning when # asyncio.get_event_loop() is used to implicitly create an event loop. # Disable this warning until the issue is resolved upstream # (https://github.com/pycontribs/subprocess-tee/pull/86). %pytest \ -vv \ -n auto \ -k 'not test_command_dependency' \ -W "ignore:There is no current event loop:DeprecationWarning" \ src/molecule/test %endif ######################################################################## # Python package files # ######################################################################## %files -n python3-%{srcname} %license LICENSE %{_bindir}/%{srcname} %{python3_sitelib}/molecule/ %{python3_sitelib}/molecule-%{version}.dist-info/ ######################################################################## # Documentation package files # ######################################################################## %if %{with doc} %files -n python3-%{srcname}-doc %license LICENSE %doc *.rst %doc html/ %endif %changelog * Fri Dec 16 2022 Maxwell G 4.0.4-5 - Add molecule Provide to python3-molecule * Fri Dec 16 2022 Maxwell G 4.0.4-4 - Rebase patches and fix tests * Fri Dec 16 2022 Maxwell G 4.0.4-3 - Use SPDX license identifier * Fri Dec 16 2022 Maxwell G 4.0.4-2 - Don't use Github tarballs * Thu Dec 15 2022 Maxwell G 4.0.4-1 - Update to 4.0.4. Fixes rhbz#2150972. * Wed Oct 26 2022 chedi toueiti 4.0.3-1 - update to version 4.0.3 (#2137799) * Tue Oct 25 2022 chedi toueiti 4.0.2-5 - add cookiecutter template files to setup.cfg data_files * Mon Oct 24 2022 chedi toueiti 4.0.2-4 - typo correction * Mon Oct 24 2022 chedi toueiti 4.0.2-3 - add missing test dependencies * Mon Oct 24 2022 chedi toueiti 4.0.2-2 - adding data files * Tue Oct 18 2022 chedi toueiti 4.0.2-1 - Update to version 4.0.2 (#2135543) * Thu Sep 22 2022 chedi toueiti 4.0.1-3 - adding ansible-core as a requirement * Sat Sep 03 2022 chedi toueiti 4.0.1-1 - update to version 4.0.1 (#2092677) * Mon Jul 11 2022 chedi toueiti 4.0.0-1 - Update to version 4.0.0 (#2092677) * Mon Jul 11 2022 chedi toueiti 3.6.1-3 - fixing some test dependencies and typo * Mon Jun 20 2022 Python Maint 3.6.1-2 - Rebuilt for Python 3.11 * Fri May 20 2022 Chedi Toueiti 3.6.1-1 - update to version 3.6.1-1 (#2051469) * Fri Jan 21 2022 Fedora Release Engineering 3.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Dec 08 2021 chedi 3.5.2-1 - relaxing the pyyaml < 6 requirement as there is no lower version in f36 * Wed Sep 01 2021 chedi 3.4.0-2 - RPMAUTOSPEC: unresolvable merge