Files
qt5/coin/provisioning/qtci-macos-26-arm/25-python.sh
Nils Petter Skålerud 7b36e50c64 Provisioning: Use local mirror for pyenv on macOS ARM hosts
On macOS hosts we are using external mirrors for installing with pyenv.
We should instead pull the necessary files from our local mirror.

Pick-to: 6.10 6.8
Change-Id: I6ba67dfd7cd37809164c7e2c4bcf89d07d45b1b2
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
(cherry picked from commit bb77943c0f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-12-19 14:04:53 +00:00

32 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copyright (C) 2021 The Qt Company Ltd.
# Copyright (C) 2017 Pelagicore AG
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# This script installs python3
# shellcheck source=../common/unix/SetEnvVar.sh
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
export PYTHON_BUILD_MIRROR_URL="https://ci-files01-hki.ci.qt.io/input/python/"
export PYTHON_BUILD_MIRROR_URL_SKIP_CHECKSUM=1
pyenv install 3.9.7
/Users/qt/.pyenv/versions/3.9.7/bin/pip3 install --user virtualenv wheel html5lib
/Users/qt/.pyenv/versions/3.9.7/bin/pip3 install --user -r ${BASH_SOURCE%/*}/../common/shared/requirements.txt
SetEnvVar "PYTHON3_PATH" "/Users/qt/.pyenv/versions/3.9.7/bin/"
SetEnvVar "PIP3_PATH" "/Users/qt/.pyenv/versions/3.9.7/bin/"
# Use 3.9 as a default python
SetEnvVar "PATH" "\$PYTHON3_PATH:\$PATH"
# Provisioning during installation says:
# 'The script sbom2doc is installed in '$HOME/.local/bin' which is not on PATH.'
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/Users/qt/.local/bin"
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/Users/qt/.pyenv/versions/3.9.7/bin/python3"
echo "python3 = 3.9.7" >> ~/versions.txt