# Tests are disabled by default, as they require networking. %bcond_with tests %global srcname molecule-podman %global modname %(echo %{srcname} | tr - _) Name: python-%{srcname} Version: 1.0.1 Release: 1%{?dist} Summary: Molecule Podman plugin License: MIT URL: https://github.com/ansible-community/molecule-podman Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-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) # This comes from the `lint` extra, but it is also necessary. BuildRequires: python3dist(yamllint) # These collections are needed for both testing and running this package. BuildRequires: ansible-collection(containers.podman) BuildRequires: ansible-collection(ansible.posix) BuildRequires: podman %endif %global _description %{expand: Molecule Podman Plugin is designed to allow use podman containers for provisioning test resources.} %description %{_description} %package -n python3-molecule-podman Summary: %{summary} # Follow Fedora Python Packaging Naming Guidelines # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_naming Provides: %{srcname} = %{version}-%{release} # Here are instructions for using podman-remote with this Molecule driver: # https://github.com/ansible-community/molecule-podman#change-podman-executable Requires: (podman or podman-remote) Requires: ansible-collection(containers.podman) Requires: ansible-collection(ansible.posix) %description -n python3-%{srcname} %{_description} %prep %setup -q -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires -r %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 %%{modname} %check # At least, run a basic sanity check. %py3_check_import %{modname} %if %{with tests} %pytest %endif # %%files -n python3-%%{srcname} -f %%{pyproject_files} %files -n python3-%{srcname} %{python3_sitelib}/%{modname} %{python3_sitelib}/%{modname}-%{version}.dist-info %license LICENSE %doc README.rst %changelog * Thu Nov 25 2021 Maxwell G - 1.0.1-1 - Update to 1.0.1. Fixes rhbz#2018838. - Implement new Fedora Packaging Guidelines. - Other miscellaneous fixes. * Fri Jul 23 2021 Fedora Release Engineering - 0.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.3.0-3 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Dec 21 2020 Chedi Toueiti - 0.3.0-1 - update to version 0.3.0 * Thu Oct 15 2020 Chedi Toueiti - 0.1-1 - initial package