BR python-unversioned-command instead of patching tests

test/units/modules/test_async_wrapper.py calls /usr/bin/python. Instead
 of patching the tests to use /usr/bin/python3, just give it what it
 wants.
This commit is contained in:
Maxwell G 2022-10-26 23:19:04 -05:00
parent 9fe3a386b3
commit 5f08c7d476
No known key found for this signature in database
GPG Key ID: F79E4E25E8C661F8

View File

@ -20,10 +20,6 @@ Release: 1%{?dist}
License: GPL-3.0-or-later AND BSD-2-Clause AND PSF-2.0 AND MIT AND Apache-2.0 License: GPL-3.0-or-later AND BSD-2-Clause AND PSF-2.0 AND MIT AND Apache-2.0
Source: https://github.com/ansible/ansible/archive/v%{version}/%{name}-%{version}.tar.gz Source: https://github.com/ansible/ansible/archive/v%{version}/%{name}-%{version}.tar.gz
# A 2.10.3 async test uses /usr/bin/python, which we do not have by default.
# Patch the test to use /usr/bin/python3 as we have for our build.
Patch: 2.10.3-test-patch.patch
# Allow Python 3.11 # Allow Python 3.11
# https://github.com/ansible/ansible/commit/dfde4be444ee66a1a0e44751b80bcf1afd6661d7 # https://github.com/ansible/ansible/commit/dfde4be444ee66a1a0e44751b80bcf1afd6661d7
# https://github.com/ansible/ansible/commit/0ef5274a3c6189e8fa6a7d97993c165ab548fe95 # https://github.com/ansible/ansible/commit/0ef5274a3c6189e8fa6a7d97993c165ab548fe95
@ -75,6 +71,10 @@ BuildRequires: python%{python3_pkgversion}-argcomplete
BuildRequires: git-core BuildRequires: git-core
BuildRequires: glibc-all-langpacks BuildRequires: glibc-all-langpacks
BuildRequires: python%{python3_pkgversion}-systemd BuildRequires: python%{python3_pkgversion}-systemd
# test/units/modules/test_async_wrapper.py needs this.
# Instead of patching the tests to use /usr/bin/python3,
# just give it what it wants.
BuildRequires: /usr/bin/python
%endif %endif
# Require packaging macros if rpm-build exists # Require packaging macros if rpm-build exists