|
|
cdd58a |
#
|
|
|
cdd58a |
# spec file for package python-molecule
|
|
|
cdd58a |
#
|
|
|
cdd58a |
# Copyright (c) 2022 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 |
|
|
|
cdd58a |
# Disable tests on Leap due to missing build dependencies.
|
|
|
cdd58a |
%if 0%{?suse_version} > 1500
|
|
|
cdd58a |
%bcond_without test
|
|
|
cdd58a |
%else
|
|
|
cdd58a |
%bcond_with test
|
|
|
cdd58a |
%endif
|
|
|
cdd58a |
|
|
|
cdd58a |
%define pythons python3
|
|
|
cdd58a |
Name: molecule
|
|
|
cdd58a |
Version: 3.6.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
|
|
|
cdd58a |
Patch0: skip-broken-test.patch
|
|
|
cdd58a |
BuildRequires: python3-rpm-macros
|
|
|
cdd58a |
BuildRequires: python3-pip
|
|
|
cdd58a |
BuildRequires: python3-wheel
|
|
|
cdd58a |
BuildRequires: python3-setuptools
|
|
|
cdd58a |
%if %{with test}
|
|
|
cdd58a |
BuildRequires: ansible
|
|
|
cdd58a |
BuildRequires: python3-pytest
|
|
|
cdd58a |
BuildRequires: python3-pytest-mock
|
|
|
cdd58a |
BuildRequires: python3-pexpect
|
|
|
cdd58a |
BuildRequires: python3-yamllint
|
|
|
cdd58a |
BuildRequires: python3-ansible-compat >= 1.0.0
|
|
|
cdd58a |
BuildRequires: python3-Cerberus >= 1.3.2
|
|
|
cdd58a |
BuildRequires: python3-click >= 8.0
|
|
|
cdd58a |
BuildRequires: python3-click-help-colors >= 0.9
|
|
|
cdd58a |
BuildRequires: python3-cookiecutter >= 1.7.3
|
|
|
cdd58a |
BuildRequires: python3-enrich >= 1.2.7
|
|
|
cdd58a |
BuildRequires: python3-filelock
|
|
|
cdd58a |
BuildRequires: python3-importlib-metadata
|
|
|
cdd58a |
BuildRequires: python3-Jinja2 >= 2.11.3
|
|
|
cdd58a |
BuildRequires: python3-packaging
|
|
|
cdd58a |
BuildRequires: python3-paramiko >= 2.5.0
|
|
|
cdd58a |
BuildRequires: python3-pluggy >= 0.7.1
|
|
|
cdd58a |
BuildRequires: python3-PyYAML >= 5.1
|
|
|
cdd58a |
BuildRequires: python3-rich >= 9.5.1
|
|
|
cdd58a |
%endif
|
|
|
cdd58a |
BuildRequires: fdupes
|
|
|
cdd58a |
Requires: ansible
|
|
|
cdd58a |
Requires: python3
|
|
|
cdd58a |
Requires: python3-ansible-compat >= 1.0.0
|
|
|
cdd58a |
Requires: python3-Cerberus >= 1.3.2
|
|
|
cdd58a |
Requires: python3-click >= 8.0
|
|
|
cdd58a |
Requires: python3-click-help-colors >= 0.9
|
|
|
cdd58a |
Requires: python3-cookiecutter >= 1.7.3
|
|
|
cdd58a |
Requires: python3-enrich >= 1.2.7
|
|
|
cdd58a |
Requires: python3-importlib-metadata
|
|
|
cdd58a |
Requires: python3-Jinja2 >= 2.11.3
|
|
|
cdd58a |
Requires: python3-packaging
|
|
|
cdd58a |
Requires: python3-paramiko >= 2.5.0
|
|
|
cdd58a |
Requires: python3-pluggy >= 0.7.1
|
|
|
cdd58a |
Requires: python3-PyYAML >= 5.1
|
|
|
cdd58a |
Requires: python3-rich >= 9.5.1
|
|
|
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
|
|
|
cdd58a |
%setup -q -n molecule-%{version}
|
|
|
cdd58a |
|
|
|
cdd58a |
%patch0 -p1
|
|
|
cdd58a |
|
|
|
cdd58a |
%build
|
|
|
cdd58a |
# On Leap < 15.4, setuptools is too old to support omitting setup.py.
|
|
|
cdd58a |
%if 0%{?sle_version} < 150400
|
|
|
cdd58a |
echo 'from setuptools import setup; setup()' > setup.py
|
|
|
cdd58a |
%endif
|
|
|
cdd58a |
%pyproject_wheel
|
|
|
cdd58a |
|
|
|
cdd58a |
%install
|
|
|
cdd58a |
%pyproject_install
|
|
|
cdd58a |
|
|
|
cdd58a |
sed -i '1{\@^#!/usr/bin/env ansible-playbook@d}' %{buildroot}%{python3_sitelib}/molecule/data/validate-dockerfile.yml
|
|
|
cdd58a |
sed -i '1{\@^#!/usr/bin/python@d}' %{buildroot}%{python3_sitelib}/molecule/test/scenarios/verifier/molecule/testinfra-pre-commit/tests/test_testinfra_pre_commit.py
|
|
|
cdd58a |
|
|
|
cdd58a |
%fdupes %{buildroot}%{python3_sitelib}
|
|
|
cdd58a |
|
|
|
cdd58a |
%check
|
|
|
cdd58a |
%if %{with test}
|
|
|
cdd58a |
export PATH="%{buildroot}%{_bindir}:$PATH"
|
|
|
cdd58a |
%pytest
|
|
|
cdd58a |
%endif
|
|
|
cdd58a |
|
|
|
cdd58a |
%files
|
|
|
cdd58a |
%license LICENSE
|
|
|
cdd58a |
%{python3_sitelib}/*
|
|
|
cdd58a |
%{_bindir}/molecule
|
|
|
cdd58a |
%{_bindir}/mol
|
|
|
cdd58a |
|
|
|
cdd58a |
%changelog
|
|
|
cdd58a |
|