diff --git a/.azure-pipelines/templates/macos/macos-build-jobs.yml b/.azure-pipelines/templates/macos/macos-build-jobs.yml index 9387f309498..e67fb574b4f 100644 --- a/.azure-pipelines/templates/macos/macos-build-jobs.yml +++ b/.azure-pipelines/templates/macos/macos-build-jobs.yml @@ -62,7 +62,7 @@ jobs: echo "Architecture: $(Architecture)" brew install python@${{ parameters.PythonVersion }} - PYTHON_PATH=$(brew --prefix python@${{ parameters.PythonVersion }})/libexec/bin/python3 + PYTHON_PATH=$(brew --prefix python@${{ parameters.PythonVersion }})/libexec/bin/python echo "Python path: $PYTHON_PATH" $PYTHON_PATH --version @@ -171,7 +171,7 @@ jobs: brew install python@${{ parameters.PythonVersion }} fi - AZ_PYTHON="$(brew --prefix python@${{ parameters.PythonVersion }})/libexec/bin/python3" + AZ_PYTHON="$(brew --prefix python@${{ parameters.PythonVersion }})/libexec/bin/python" export AZ_PYTHON echo "System architecture: $(uname -m)" diff --git a/.azure-pipelines/templates/macos/macos-cask-generation-and-tests.yml b/.azure-pipelines/templates/macos/macos-cask-generation-and-tests.yml index 5a29d6dce84..ce34c4f3ff9 100644 --- a/.azure-pipelines/templates/macos/macos-cask-generation-and-tests.yml +++ b/.azure-pipelines/templates/macos/macos-cask-generation-and-tests.yml @@ -302,7 +302,7 @@ jobs: brew install python@${{ parameters.PythonVersion }} fi - AZ_PYTHON="$(brew --prefix python@${{ parameters.PythonVersion }})/libexec/bin/python3" + AZ_PYTHON="$(brew --prefix python@${{ parameters.PythonVersion }})/libexec/bin/python" export AZ_PYTHON export AZ_DEBUG=1 diff --git a/.azure-pipelines/templates/macos/macos-sign-notarize-jobs.yml b/.azure-pipelines/templates/macos/macos-sign-notarize-jobs.yml index 657a4f50500..106d27cf431 100644 --- a/.azure-pipelines/templates/macos/macos-sign-notarize-jobs.yml +++ b/.azure-pipelines/templates/macos/macos-sign-notarize-jobs.yml @@ -713,7 +713,7 @@ jobs: echo "=== Functional Test ===" # Test CLI if brew list python@${{ parameters.PythonVersion }} &>/dev/null; then - AZ_PYTHON="$(brew --prefix python@${{ parameters.PythonVersion }})/libexec/bin/python3" + AZ_PYTHON="$(brew --prefix python@${{ parameters.PythonVersion }})/libexec/bin/python" export AZ_PYTHON export AZ_DEBUG=1 if "$TEST_DIR/bin/az" version 2>&1 | head -5; then diff --git a/scripts/release/macos/build_binary_tar_gz.py b/scripts/release/macos/build_binary_tar_gz.py index 957eb626f2b..c673d3b7754 100644 --- a/scripts/release/macos/build_binary_tar_gz.py +++ b/scripts/release/macos/build_binary_tar_gz.py @@ -138,8 +138,8 @@ def _load_template(path: Path) -> str: def find_homebrew_python() -> Path: """Find necessary Homebrew Python x.yz installation.""" candidates = [ - Path(f"/opt/homebrew/opt/python@{PYTHON_MAJOR_MINOR}/libexec/bin/python3"), - Path(f"/usr/local/opt/python@{PYTHON_MAJOR_MINOR}/libexec/bin/python3"), + Path(f"/opt/homebrew/opt/python@{PYTHON_MAJOR_MINOR}/libexec/bin/python"), + Path(f"/usr/local/opt/python@{PYTHON_MAJOR_MINOR}/libexec/bin/python"), Path(f"/opt/homebrew/bin/python{PYTHON_MAJOR_MINOR}"), Path(f"/usr/local/bin/python{PYTHON_MAJOR_MINOR}"), ] @@ -157,7 +157,7 @@ def find_homebrew_python() -> Path: check=True, ) prefix = Path(result.stdout.strip()) - python_path = prefix / "libexec" / "bin" / "python3" + python_path = prefix / "libexec" / "bin" / "python" if python_path.exists() and _is_python_version(python_path, PYTHON_MAJOR_MINOR): print(f"Found Homebrew Python via brew --prefix: {python_path}") return python_path