|
|
cdd58a |
#
|
|
|
b9e9bc |
# spec file for package molecule
|
|
|
cdd58a |
#
|
|
|
b9e9bc |
# Copyright (c) 2023 SUSE LLC
|
|
|
cdd58a |
#
|
|
|
cdd58a |
# All modifications and additions to the file contributed by third parties
|
|
|
cdd58a |
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
cdd58a |
# upon. The license for this file, and modifications and additions to the
|
|
|
cdd58a |
# file, is the same license as for the pristine package itself (unless the
|
|
|
cdd58a |
# license for the pristine package is not an Open Source License, in which
|
|
|
cdd58a |
# case the license is the MIT License). An "Open Source License" is a
|
|
|
cdd58a |
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
cdd58a |
# published by the Open Source Initiative.
|
|
|
cdd58a |
|
|
|
cdd58a |
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
cdd58a |
#
|
|
|
cdd58a |
|
|
|
cdd58a |
|
|
|
f868a2 |
%{?sle15_python_module_pythons}
|
|
|
f868a2 |
%if 0%{?suse_version} < 1550
|
|
|
f868a2 |
# Leap15, SLES15
|
|
|
f868a2 |
%if %pythons == "python310"
|
|
|
f868a2 |
%define ansible_python python310
|
|
|
f868a2 |
%define ansible_python_executable python3.10
|
|
|
f868a2 |
%define ansible_python_sitelib %python310_sitelib
|
|
|
f868a2 |
%endif
|
|
|
f868a2 |
%if %pythons == "python311"
|
|
|
f868a2 |
%define ansible_python python311
|
|
|
f868a2 |
%define ansible_python_executable python3.11
|
|
|
f868a2 |
%define ansible_python_sitelib %python311_sitelib
|
|
|
f868a2 |
%endif
|
|
|
cdd58a |
%else
|
|
|
f868a2 |
# Tumbleweed
|
|
|
f868a2 |
%define pythons python3
|
|
|
f868a2 |
%define ansible_python python3
|
|
|
f868a2 |
%define ansible_python_executable python3
|
|
|
f868a2 |
%define ansible_python_sitelib %python3_sitelib
|
|
|
cdd58a |
%endif
|
|
|
cdd58a |
|
|
|
f868a2 |
%bcond_without test
|
|
|
cdd58a |
Name: molecule
|
|
|
969cdf |
Version: 24.2.1
|
|
|
cdd58a |
Release: 0
|
|
|
cdd58a |
Summary: Aids in the development and testing of Ansible roles
|
|
|
cdd58a |
License: MIT
|
|
|
cdd58a |
URL: https://github.com/ansible-community/molecule
|
|
|
cdd58a |
Source: https://files.pythonhosted.org/packages/source/m/molecule/molecule-%{version}.tar.gz
|
|
|
f868a2 |
BuildRequires: python-rpm-macros
|
|
|
bb34a0 |
BuildRequires: %{ansible_python}-base >= 3.10
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-pip
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-setuptools
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-wheel
|
|
|
cdd58a |
%if %{with test}
|
|
|
f868a2 |
BuildRequires: ansible-lint >= 6.12.1
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-ansi2html >= 1.8.0
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-coverage >= 7.0.3
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-filelock >= 3.9.0
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-pexpect >= 4.8.0
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-pytest >= 7.2.0
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-pytest-mock >= 3.10.0
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-pytest-plus >= 0.4.0
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-pytest-xdist >= 3.1.0
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-yamllint
|
|
|
55a83b |
%endif
|
|
|
55a83b |
# add runtime dependencies of molecule as BuildRequires
|
|
|
55a83b |
# https://github.com/ansible/molecule/blob/main/.config/requirements.in
|
|
|
55a83b |
BuildRequires: %{ansible_python}-base >= 3.9
|
|
|
55a83b |
BuildRequires: ansible-core >= 2.12.10
|
|
|
55a83b |
BuildRequires: %{ansible_python}-ansible-compat >= 4.1.8
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-click >= 8.0
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-click-help-colors >= 0.9
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-enrich >= 1.2.7
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-jsonschema >= 4.9.1
|
|
|
55a83b |
BuildRequires: %{ansible_python}-Jinja2 >= 2.11.3
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-packaging
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-pluggy >= 0.7.1
|
|
|
55a83b |
BuildRequires: %{ansible_python}-PyYAML >= 5.1
|
|
|
f868a2 |
BuildRequires: %{ansible_python}-rich >= 9.5.1
|
|
|
55a83b |
BuildRequires: %{ansible_python}-wcmatch >= 8.1.2
|
|
|
cdd58a |
BuildRequires: fdupes
|
|
|
55a83b |
# https://github.com/ansible/molecule/blob/main/.config/requirements.in
|
|
|
55a83b |
Requires: %{ansible_python}-base >= 3.9
|
|
|
55a83b |
Requires: %{ansible_python}-ansible-compat >= 4.1.8
|
|
|
55a83b |
Requires: ansible-core >= 2.12.10
|
|
|
f868a2 |
Requires: %{ansible_python}-click >= 8.0
|
|
|
f868a2 |
Requires: %{ansible_python}-click-help-colors >= 0.9
|
|
|
f868a2 |
Requires: %{ansible_python}-enrich >= 1.2.7
|
|
|
f868a2 |
Requires: %{ansible_python}-jsonschema >= 4.9.1
|
|
|
55a83b |
Requires: %{ansible_python}-Jinja2 >= 2.11.3
|
|
|
f868a2 |
Requires: %{ansible_python}-packaging
|
|
|
f868a2 |
Requires: %{ansible_python}-pluggy >= 0.7.1
|
|
|
55a83b |
Requires: %{ansible_python}-PyYAML >= 5.1
|
|
|
f868a2 |
Requires: %{ansible_python}-rich >= 9.5.1
|
|
|
55a83b |
Requires: %{ansible_python}-wcmatch >= 8.1.2
|
|
|
cdd58a |
BuildArch: noarch
|
|
|
cdd58a |
|
|
|
cdd58a |
%description
|
|
|
cdd58a |
Molecule project is designed to aid in the development and testing of
|
|
|
cdd58a |
Ansible roles.
|
|
|
cdd58a |
|
|
|
cdd58a |
Molecule provides support for testing with multiple instances, operating
|
|
|
cdd58a |
systems and distributions, virtualization providers, test frameworks and
|
|
|
cdd58a |
testing scenarios.
|
|
|
cdd58a |
|
|
|
cdd58a |
%prep
|
|
|
1af230 |
%autosetup -p 1 -n molecule-%{version}
|
|
|
cdd58a |
|
|
|
cdd58a |
%build
|
|
|
cdd58a |
%pyproject_wheel
|
|
|
cdd58a |
|
|
|
cdd58a |
%install
|
|
|
cdd58a |
%pyproject_install
|
|
|
f868a2 |
%fdupes %{buildroot}%{ansible_python_sitelib}
|
|
|
cdd58a |
|
|
|
cdd58a |
%check
|
|
|
cdd58a |
%if %{with test}
|
|
|
cdd58a |
export PATH="%{buildroot}%{_bindir}:$PATH"
|
|
|
f868a2 |
sed -i '/^addopts/s/ --color=yes//' pyproject.toml
|
|
|
f868a2 |
|
|
|
55a83b |
IGNORED_CHECKS="test_podman"
|
|
|
55a83b |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_command_dependency"
|
|
|
55a83b |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_command_init_role[delegated]"
|
|
|
55a83b |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_command_init_scenario[delegated]"
|
|
|
55a83b |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_docker"
|
|
|
55a83b |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_molecule_schema"
|
|
|
55a83b |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_sample_collection"
|
|
|
55a83b |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_with_and_without_gitignore[test_w_gitignore]"
|
|
|
320cdf |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_execute_cmdline_scenarios"
|
|
|
320cdf |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_execute_cmdline_scenarios_prune"
|
|
|
320cdf |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_execute_cmdline_scenarios_no_prune"
|
|
|
320cdf |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_execute_cmdline_scenarios_exit_destroy"
|
|
|
320cdf |
IGNORED_CHECKS="${IGNORED_CHECKS} or test_execute_cmdline_scenarios_exit_nodestroy"
|
|
|
55a83b |
|
|
|
55a83b |
%pytest -k "not (${IGNORED_CHECKS})" -W ignore:'There is no current event loop'
|
|
|
cdd58a |
%endif
|
|
|
cdd58a |
|
|
|
cdd58a |
%files
|
|
|
cdd58a |
%license LICENSE
|
|
|
f868a2 |
%{ansible_python_sitelib}/*
|
|
|
cdd58a |
%{_bindir}/molecule
|
|
|
cdd58a |
|
|
|
cdd58a |
%changelog
|