2022-03-28 13:46:38 +00:00
#
# spec file for package python-ansible-compat
#
# Copyright (c) 2022 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/
#
2023-05-16 10:21:12 +00:00
%{?sle15_python_module_pythons}
%if 0%{?suse_version} >= 1650
2022-12-02 07:55:10 +00:00
# Tumbleweed
2022-03-28 13:46:38 +00:00
# only works with the python version which the package 'ansible' uses
%define pythons python3
2022-12-02 07:55:10 +00:00
%endif
2022-03-28 13:46:38 +00:00
Name : python-ansible-compat
2024-06-10 04:42:36 +00:00
Version : 24.6.1
2022-03-28 13:46:38 +00:00
Release : 0
2022-04-01 18:53:24 +00:00
Summary : Compatibility shim for Ansible 2.9 and newer
2022-03-28 13:46:38 +00:00
License : MIT
URL : https://github.com/ansible-community/ansible-compat
2024-03-20 14:43:41 +00:00
Source : https://github.com/ansible-community/ansible-compat/archive/refs/tags/v%{version} .tar.gz#/%{name}-%{version}.tar.gz
2022-03-28 13:46:38 +00:00
BuildRequires : %{python_module pip}
2022-05-22 10:21:22 +00:00
BuildRequires : %{python_module setuptools_scm}
BuildRequires : %{python_module setuptools}
2022-03-28 13:46:38 +00:00
BuildRequires : %{python_module wheel}
2022-05-22 10:21:22 +00:00
BuildRequires : python-rpm-macros
2022-03-28 13:46:38 +00:00
# SECTION test
2024-05-14 15:13:23 +00:00
# https://github.com/ansible/ansible-compat/blob/main/.config/requirements.in
2024-06-01 07:40:42 +00:00
BuildRequires : ansible-core >= 2.14
2022-05-22 10:21:22 +00:00
BuildRequires : %{python_module PyYAML}
2023-05-22 12:22:37 +00:00
BuildRequires : %{python_module jsonschema >= 4.17.3}
2023-02-06 17:35:57 +00:00
BuildRequires : %{python_module subprocess-tee >= 0.4.1}
2024-05-14 15:13:23 +00:00
# https://github.com/ansible/ansible-compat/blob/main/.config/requirements-test.in
2023-09-07 07:50:05 +00:00
BuildRequires : %{python_module pytest}
BuildRequires : %{python_module pytest-mock}
BuildRequires : %{python_module pytest-plus}
2022-03-28 13:46:38 +00:00
# /SECTION
BuildRequires : fdupes
2022-05-22 10:21:22 +00:00
BuildRequires : python-rpm-generators
2024-06-01 07:40:42 +00:00
Requires : ansible-core >= 2.14
2023-09-07 07:50:05 +00:00
Requires : python-PyYAML
Requires : python-jsonschema >= 4.17.3
Requires : python-packaging
2023-02-06 17:35:57 +00:00
Requires : python-subprocess-tee >= 0.4.1
2023-09-07 07:50:05 +00:00
%{?python_enable_dependency_generator}
2022-03-28 13:46:38 +00:00
BuildArch : noarch
%python_subpackages
%description
Facilitate working with various versions of Ansible 2.9 and newer.
%prep
%setup -q -n ansible-compat-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot} %{$python_sitelib}
%check
# excluding tests requiring internet connection
2023-09-07 07:50:05 +00:00
IGNORED_CHECKS=" t e s t _ i n s t a l l _ c o l l e c t i o n "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ i n s t a l l _ c o l l e c t i o n _ d e s t "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ p r e p a r e _ e n v i r o n m e n t _ w i t h _ c o l l e c t i o n s "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ p r e r u n _ r e q s _ v 1 "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ p r e r u n _ r e q s _ v 2 "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ r e q u i r e _ c o l l e c t i o n "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ r e q u i r e _ c o l l e c t i o n _ n o _ c a c h e _ d i r "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ r e q u i r e _ c o l l e c t i o n _ w r o n g _ v e r s i o n "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ r u n t i m e _ e x a m p l e "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ r u n t i m e _ r e q u i r e _ m o d u l e "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ s c a n _ s y s _ p a t h [ i s o l a t e d F - s c a n F - r a i s e s _ n o t _ f o u n d T ] "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ s c a n _ s y s _ p a t h [ i s o l a t e d F - s c a n T - r a i s e s _ n o t _ f o u n d F ] "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ s c a n _ s y s _ p a t h [ i s o l a t e d T - s c a n F - r a i s e s _ n o t _ f o u n d T ] "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ s c a n _ s y s _ p a t h [ i s o l a t e d T - s c a n T - r a i s e s _ n o t _ f o u n d T ] "
2024-01-13 10:00:01 +00:00
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ s c a n _ s y s _ p a t h [ s c a n F - r a i s e s _ n o t _ f o u n d T ] "
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ s c a n _ s y s _ p a t h [ s c a n T - r a i s e s _ n o t _ f o u n d F ] "
2023-09-07 07:50:05 +00:00
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ u p g r a d e _ c o l l e c t i o n "
2024-05-14 15:13:23 +00:00
IGNORED_CHECKS=" $ { I G N O R E D _ C H E C K S } o r t e s t _ r u n t i m e _ h a s _ p l a y b o o k "
2023-11-24 13:04:27 +00:00
# Disable checks on test names: https://github.com/pytest-dev/pytest-plus#user-content-avoiding-problematic-test-identifiers https://github.com/ansible/ansible-compat/issues/340
export PYTEST_CHECK_TEST_ID_REGEX=0
2023-09-07 07:50:05 +00:00
%pytest -k " n o t ( $ { I G N O R E D _ C H E C K S } ) "
2022-03-28 13:46:38 +00:00
%files %{python_files}
2023-07-21 07:07:14 +00:00
%{python_sitelib} /ansible_compat
%{python_sitelib} /ansible_compat-%{version} .dist-info
2022-03-28 13:46:38 +00:00
%doc README.md
%license LICENSE
%changelog