From b3b303d294ff511c0d1cb33571e93dc741238870 Mon Sep 17 00:00:00 2001 From: Shamil Mubarakshin <127750046+shamil-mubarakshin@users.noreply.github.com> Date: Sun, 15 Oct 2023 20:34:15 +0200 Subject: [PATCH] [macos] Remove python2 UnixTools and adjust brew symlinks (#8452) --- images/macos/provision/core/python.sh | 17 +++++++++++++---- .../software-report/SoftwareReport.Common.psm1 | 4 ++-- images/macos/tests/Python.Tests.ps1 | 12 ++---------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/images/macos/provision/core/python.sh b/images/macos/provision/core/python.sh index 287070b1b..be801340b 100755 --- a/images/macos/provision/core/python.sh +++ b/images/macos/provision/core/python.sh @@ -7,7 +7,18 @@ if is_Monterey || is_BigSur; then echo "Install latest Python 2" Python2Url="https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg" download_with_retries $Python2Url "/tmp" "python2.pkg" - sudo installer -pkg /tmp/python2.pkg -target / + + sudo installer -showChoiceChangesXML -pkg /tmp/python2.pkg -target / > /tmp/python2_choices.xml + + # To avoid symlink conflicts, remove tools installation in /usr/local/bin using installer choices + xmllint --shell /tmp/python2_choices.xml <