diff --git a/ansible.changes b/ansible.changes index 0067430..e63d74b 100644 --- a/ansible.changes +++ b/ansible.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 12 04:59:25 UTC 2021 - Steve Kowalik + +- If building with Python 3, change the shebang of the test scripts + shipped in ansible-test to be /usr/bin/python3. + ------------------------------------------------------------------- Thu Jun 24 15:46:27 UTC 2021 - Michael Ströder diff --git a/ansible.spec b/ansible.spec index 88908eb..c06a034 100644 --- a/ansible.spec +++ b/ansible.spec @@ -300,6 +300,12 @@ find contrib/ -type f -exec chmod 644 {} + find ./ -type f -exec \ sed -i '1s|^#!%{_bindir}/env |#!%{_bindir}/|' {} \; +# Run test fragments under Python 3, if that is our configured Python. +%if %{with python3} + find test -name '*.py' -exec \ + sed -i '1s|^\(#!%{_bindir}/python\)$|\13|' {} \; +%endif + %build %{python} setup.py build %if 0%{?with_docs}