File python-testinfra.spec of Package python-testinfra.openSUSE_Backports_SLE-12

# spec file for package python-testinfra
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-testinfra
Version:        1.6.5
Release:        0
Summary:        Test infrastructures
License:        Apache-2.0
Group:          Development/Languages/Python
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module pbr}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires(post):   update-alternatives
Requires(postun): update-alternatives
Requires:       python-pytest
Requires:       python-six >= 1.4
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch


With Testinfra you can write unit tests in Python to test actual state of
your servers configured by managements tools like Salt, Ansible, Puppet,
Chef and so on.

Testinfra aims to be a Serverspec equivalent in python and is written as
a plugin to the Pytest test engine

%setup -q -n testinfra-%{version}


%python_clone -a %{buildroot}%{_bindir}/testinfra
%python_expand %fdupes %{buildroot}%{$python_sitelib}/testinfra

%python_install_alternative testinfra

%python_uninstall_alternative testinfra

%files %{python_files}
%python_alternative %{_bindir}/testinfra