Accepting request 905731 from home:StevenK:branches:systemsmanagement

- If building with Python 3, change the shebang of the test scripts
  shipped in ansible-test to be /usr/bin/python3.

OBS-URL: https://build.opensuse.org/request/show/905731
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ansible?expand=0&rev=211
This commit is contained in:
Michael Ströder 2021-07-13 15:36:33 +00:00 committed by Git OBS Bridge
parent dce5e14889
commit 62f0909e4b
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 12 04:59:25 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- 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 <michael@stroeder.com>

View File

@ -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}