URL: https://github.com/freeipa/freeipa/pull/1112 Author: stlaz Title: #1112: ipatests: use python3 if built with python3 Action: opened
PR body: """ Change the default python version for test scripts https://pagure.io/freeipa/issue/7131 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/1112/head:pr1112 git checkout pr1112
From 25f0596d18832545866bafa2517543f797e9678d Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka <slazn...@redhat.com> Date: Mon, 25 Sep 2017 13:06:47 +0200 Subject: [PATCH] ipatests: use python3 if built with python3 Change the default python version for test scripts https://pagure.io/freeipa/issue/7131 --- freeipa.spec.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/freeipa.spec.in b/freeipa.spec.in index fdb87824fe..d9e77291b3 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -1027,10 +1027,21 @@ mv %{buildroot}%{_bindir}/ipa-test-task %{buildroot}%{_bindir}/ipa-test-task-%{p ln -s %{_bindir}/ipa-run-tests-%{python2_version} %{buildroot}%{_bindir}/ipa-run-tests-2 ln -s %{_bindir}/ipa-test-config-%{python2_version} %{buildroot}%{_bindir}/ipa-test-config-2 ln -s %{_bindir}/ipa-test-task-%{python2_version} %{buildroot}%{_bindir}/ipa-test-task-2 -# test framework defaults to Python 2 +%endif # with_ipatests + +# Decide which Python (2 or 3) should be used as default for tests +%if 0%{?with_ipatests} +%if 0%{?with_python3} +# Building with python3 => make it default for tests +ln -s %{_bindir}/ipa-run-tests-%{python3_version} %{buildroot}%{_bindir}/ipa-run-tests +ln -s %{_bindir}/ipa-test-config-%{python3_version} %{buildroot}%{_bindir}/ipa-test-config +ln -s %{_bindir}/ipa-test-task-%{python3_version} %{buildroot}%{_bindir}/ipa-test-task +%else +# Building python2 only => make it default for tests ln -s %{_bindir}/ipa-run-tests-%{python2_version} %{buildroot}%{_bindir}/ipa-run-tests ln -s %{_bindir}/ipa-test-config-%{python2_version} %{buildroot}%{_bindir}/ipa-test-config ln -s %{_bindir}/ipa-test-task-%{python2_version} %{buildroot}%{_bindir}/ipa-test-task +%endif # with_python3 %endif # with_ipatests # remove files which are useful only for make uninstall
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org