From faf7798c16177d6f97e58dd60fb910d97a21f36b Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Tue, 25 Feb 2020 12:57:01 -0800 Subject: [PATCH] revert python3 setup + add TODO; python3 tests aren't working now but python2 is EOL so they should work soon --- .ci/azure-pipelines-steps.yml | 2 ++ .ci/azure-pipelines.yml | 4 ++-- .../modules/custom_python_detect_environment.py | 2 +- .../issue_152__virtualenv_python_fails.yml | 16 ++-------------- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.ci/azure-pipelines-steps.yml b/.ci/azure-pipelines-steps.yml index 484fb039..07358c0f 100644 --- a/.ci/azure-pipelines-steps.yml +++ b/.ci/azure-pipelines-steps.yml @@ -17,6 +17,8 @@ steps: # need wheel before building virtualenv because of bdist_wheel and setuptools deps # Mac's System Integrity Protection prevents symlinking /usr/bin # and Azure isn't allowing disabling it apparently: https://developercommunityapi.westus.cloudapp.azure.com/idea/558702/allow-disabling-sip-on-microsoft-hosted-macos-agen.html + # the || will activate when running python3 tests + # TODO: get python3 tests passing (sudo ln -fs /usr/bin/python$(python.version) /usr/bin/python && /usr/bin/python -m pip install -U pip wheel setuptools && /usr/bin/python -m pip install -U virtualenv && diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index 4363b704..65120ac9 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -15,8 +15,8 @@ jobs: Mito27_27: python.version: '2.7' MODE: mitogen - Ans288_37: - python.version: '3' + Ans288_27: + python.version: '2.7' MODE: localhost_ansible VER: 2.8.8 diff --git a/tests/ansible/lib/modules/custom_python_detect_environment.py b/tests/ansible/lib/modules/custom_python_detect_environment.py index db018202..9f628a03 100644 --- a/tests/ansible/lib/modules/custom_python_detect_environment.py +++ b/tests/ansible/lib/modules/custom_python_detect_environment.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python # I am an Ansible new-style Python module. I return details about the Python # interpreter I run within. diff --git a/tests/ansible/regression/issue_152__virtualenv_python_fails.yml b/tests/ansible/regression/issue_152__virtualenv_python_fails.yml index f4d29442..31983afc 100644 --- a/tests/ansible/regression/issue_152__virtualenv_python_fails.yml +++ b/tests/ansible/regression/issue_152__virtualenv_python_fails.yml @@ -15,27 +15,15 @@ no_proxy: "{{ lookup('env', 'no_proxy')|default('') }}" PATH: "{{ lookup('env', 'PATH') }}" - - name: set python interpreter because mac symlinks things and complains - block: - - name: set python3 interpreter - when: lout.python_version.startswith('3') - set_fact: - python_interpreter: /tmp/issue_152_virtualenv/bin/python3 - - - name: set python2 interpreter - when: lout.python_version.startswith('2') - set_fact: - python_interpreter: /tmp/issue_152_virtualenv/bin/python - - custom_python_detect_environment: vars: - ansible_python_interpreter: "{{ python_interpreter }}" + ansible_python_interpreter: /tmp/issue_152_virtualenv/bin/python register: out when: lout.python_version > '2.6' - assert: that: - - out.sys_executable == "{{ python_interpreter }}" + - out.sys_executable == /tmp/issue_152_virtualenv/bin/python when: lout.python_version > '2.6' - file: