From 2a06d493ded4506377602fe99741918f864c2c3e Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sun, 27 Sep 2020 11:10:35 -0700 Subject: [PATCH] python3 needs python3-venv --- .ci/prep_azure.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/prep_azure.py b/.ci/prep_azure.py index ceea4f04..ffd44551 100755 --- a/.ci/prep_azure.py +++ b/.ci/prep_azure.py @@ -35,6 +35,8 @@ venv_steps = [] need_to_fix_psycopg2 = False +is_python3 = os.environ['PYTHONVERSION'].startswith('3') + # @dw: The VSTS-shipped Pythons available via UsePythonVErsion are pure garbage, # broken symlinks, incorrect permissions and missing codecs. So we use the # deadsnakes PPA to get sane Pythons, and setup a virtualenv to install our @@ -54,8 +56,10 @@ if ci_lib.have_apt(): 'sudo ln -fs /usr/bin/python{pv} /usr/local/bin/python{pv}' .format(pv=os.environ['PYTHONVERSION']) ]) + if is_python3: + venv_steps.append('sudo apt-get -y install python3-venv') # TODO: somehow `Mito36CentOS6_26` has both brew and apt installed https://dev.azure.com/dw-mitogen/Mitogen/_build/results?buildId=1031&view=logs&j=7bdbcdc6-3d3e-568d-ccf8-9ddca1a9623a&t=73d379b6-4eea-540f-c97e-046a2f620483 -elif os.environ['PYTHONVERSION'].startswith('3') and ci_lib.have_brew(): +elif is_python3 and ci_lib.have_brew(): # 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 # so we'll use /usr/local/bin/python for everything