File saltbundlepy-salt-test.spec of Package saltbundlepy-salt-test

#
# spec file for package saltbundlepy-salt-test
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

%define modname salt-test
%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}}
%define pythons saltbundlepy
Name:           saltbundlepy-salt-test
Version:        1.7
Release:        0
Summary:        Run Salt's test suite by "test group"
License:        MIT
Source:         %{modname}-v%{version}.tar.gz
BuildRequires:  %{saltbundlepy_module base >= 3.6}
BuildRequires:  %{saltbundlepy_module setuptools}
BuildRequires:  %{saltbundlepy_module pip}
BuildRequires:  %{saltbundlepy_module pytest}
BuildRequires:  %{saltbundlepy_module wheel}
BuildRequires:  fdupes
BuildRequires:  saltbundlepy-rpm-macros
%if %python_version_nodots < 311
Requires:       saltbundlepy-tomli
%endif
Requires:       saltbundlepy-requests
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch:      noarch
%python_subpackages

%description
salt-test is a test suite launcher for Salt's test suite by "test group".  It takes a `skiplist` that defines which tests files to ignore and which tests to skip.

%prep
%setup -q -n %{modname}-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/salt-test
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}

%pre
%python_libalternatives_reset_alternative salt-test

%post
%python_install_alternative salt-test

%postun
%python_uninstall_alternative salt-test

%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/salt-test
%{python_sitelib}/salt_test-%{version}*-info
%{python_sitelib}/salt_test

%changelog
openSUSE Build Service is sponsored by