Files
qt5/coin/provisioning/qtci-macos-13-arm/25-python.sh
Matti Paaso ab8b59805a Provisioning: Remove python2 installation
Provision started to fail in python2 installation.

Task-number: QTQAINFRA-7459
Pick-to: 6.10 6.8 6.5
Change-Id: I3059615e8469bf935031791fa826452e01f4f972
Reviewed-by: Simo Fält <simo.falt@qt.io>
2025-10-02 22:02:13 +03:00

27 lines
1.0 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"
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"
echo "python3 = 3.9.7" >> ~/versions.txt