%bcond tests %{undefined rhel} %global ansible_collection community.hashi_vault Name: ansible-collection-community-hashi_vault Version: 6.2.1 Release: 1%{?dist} Summary: The %{ansible_collection} collection for Ansible # See the LICENSES directory and the summary in the README License: GPL-3.0-or-later AND BSD-2-Clause URL: https://github.com/ansible-collections/%{ansible_collection} Source: https://github.com/ansible-collections/%{ansible_collection}/archive/refs/tags/%{version}.tar.gz # build_ignore development files, tests, and docs Patch: build_ignore.patch BuildArch: noarch BuildRequires: ansible-packaging %if %{with tests} BuildRequires: ansible-packaging-tests BuildRequires: pyproject-rpm-macros # needed by the tests BuildRequires: python%{python3_pkgversion}-hvac BuildRequires: python%{python3_pkgversion}-urllib3 %endif %description Ansible collection for managing and working with HashiCorp Vault. %prep %autosetup -p1 -n community.hashi_vault-%{version} find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' + find -type f -executable -name '*.py' -print -exec sed -i -e '1{s@^#!.*@#!%{__python3}@}' '{}' + %if %{with tests} %generate_buildrequires %pyproject_buildrequires -N tests/unit/requirements.txt %endif %build %ansible_collection_build %install %ansible_collection_install %check %if %{with tests} %ansible_test_unit %endif %files -f %{ansible_collection_filelist} %license LICENSES %doc README.md CHANGELOG.rst CHANGELOG.md %changelog * Mon Apr 6 2026 Andreas Haupt - 6.2.1-1 - initial package