From 97e9150dbe97f592750f0800e8141ef3da021369 Mon Sep 17 00:00:00 2001 From: Matti Paaso Date: Wed, 1 Oct 2025 13:45:48 +0300 Subject: [PATCH] Provisioning: Fix pyenv installation Task-number: QTQAINFRA-7439 Pick-to: 6.8 6.5 Change-Id: I02202d1b53ab5442e04b6e5c0d7ff3119686f117 Reviewed-by: Jukka Jokiniva (cherry picked from commit 986d4b8760d79c96a2364c81e483c7d4824e50d4) --- .../common/macos/install-pyenv.sh | 23 +++++++++ .../qtci-macos-11-arm/24-pyenv.sh | 51 ++----------------- .../qtci-macos-12-arm/24-pyenv.sh | 51 ++----------------- .../qtci-macos-13-arm/24-pyenv.sh | 51 ++----------------- .../qtci-macos-14-arm/24-pyenv.sh | 51 ++----------------- .../qtci-macos-15-arm/24-pyenv.sh | 51 ++----------------- .../qtci-macos-26-arm/24-pyenv.sh | 8 +++ 7 files changed, 56 insertions(+), 230 deletions(-) create mode 100755 coin/provisioning/common/macos/install-pyenv.sh create mode 100755 coin/provisioning/qtci-macos-26-arm/24-pyenv.sh diff --git a/coin/provisioning/common/macos/install-pyenv.sh b/coin/provisioning/common/macos/install-pyenv.sh new file mode 100755 index 00000000..28e77f9b --- /dev/null +++ b/coin/provisioning/common/macos/install-pyenv.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# shellcheck source=../common/unix/SetEnvVar.sh +source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" + +# shellcheck source=./DownloadURL.sh +source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh" + +installerFile="pyenv-installer" +sha="1c2f20c26dc8bb7409a6031e8777c0c1b2aae9da" +cacheUrl="https://ci-files01-hki.ci.qt.io/input/python/pyenv/${installerFile}" +target="${installerFile}" + +DownloadURL "$cacheUrl" "" "$sha" "$target" +chmod +x "$target" +"./$target" +SetEnvVar "PYENV_ROOT" "/Users/qt/.pyenv" +SetEnvVar "PATH" "\$PYENV_ROOT/bin:\$PATH" +rm -f "$target" diff --git a/coin/provisioning/qtci-macos-11-arm/24-pyenv.sh b/coin/provisioning/qtci-macos-11-arm/24-pyenv.sh index 3a7a8f77..f0f36e41 100755 --- a/coin/provisioning/qtci-macos-11-arm/24-pyenv.sh +++ b/coin/provisioning/qtci-macos-11-arm/24-pyenv.sh @@ -1,49 +1,8 @@ #!/usr/bin/env bash +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -############################################################################# -## -## Copyright (C) 2021 The Qt Company Ltd. -## Copyright (C) 2017 Pelagicore AG -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 3 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL3 included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 3 requirements -## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 2.0 or (at your option) the GNU General -## Public license version 3 or any later version approved by the KDE Free -## Qt Foundation. The licenses are as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-2.0.html and -## https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +set -ex -# This script installs python3 - -# shellcheck source=../common/unix/SetEnvVar.sh -source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" - -# Try with default -/opt/homebrew/bin/brew install pyenv +# shellcheck source=../common/macos/install-pyenv.sh +source "${BASH_SOURCE%/*}/../common/macos/install-pyenv.sh" diff --git a/coin/provisioning/qtci-macos-12-arm/24-pyenv.sh b/coin/provisioning/qtci-macos-12-arm/24-pyenv.sh index 3a7a8f77..f0f36e41 100755 --- a/coin/provisioning/qtci-macos-12-arm/24-pyenv.sh +++ b/coin/provisioning/qtci-macos-12-arm/24-pyenv.sh @@ -1,49 +1,8 @@ #!/usr/bin/env bash +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -############################################################################# -## -## Copyright (C) 2021 The Qt Company Ltd. -## Copyright (C) 2017 Pelagicore AG -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 3 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL3 included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 3 requirements -## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 2.0 or (at your option) the GNU General -## Public license version 3 or any later version approved by the KDE Free -## Qt Foundation. The licenses are as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-2.0.html and -## https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +set -ex -# This script installs python3 - -# shellcheck source=../common/unix/SetEnvVar.sh -source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" - -# Try with default -/opt/homebrew/bin/brew install pyenv +# shellcheck source=../common/macos/install-pyenv.sh +source "${BASH_SOURCE%/*}/../common/macos/install-pyenv.sh" diff --git a/coin/provisioning/qtci-macos-13-arm/24-pyenv.sh b/coin/provisioning/qtci-macos-13-arm/24-pyenv.sh index 3a7a8f77..f0f36e41 100755 --- a/coin/provisioning/qtci-macos-13-arm/24-pyenv.sh +++ b/coin/provisioning/qtci-macos-13-arm/24-pyenv.sh @@ -1,49 +1,8 @@ #!/usr/bin/env bash +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -############################################################################# -## -## Copyright (C) 2021 The Qt Company Ltd. -## Copyright (C) 2017 Pelagicore AG -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 3 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL3 included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 3 requirements -## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 2.0 or (at your option) the GNU General -## Public license version 3 or any later version approved by the KDE Free -## Qt Foundation. The licenses are as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-2.0.html and -## https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +set -ex -# This script installs python3 - -# shellcheck source=../common/unix/SetEnvVar.sh -source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" - -# Try with default -/opt/homebrew/bin/brew install pyenv +# shellcheck source=../common/macos/install-pyenv.sh +source "${BASH_SOURCE%/*}/../common/macos/install-pyenv.sh" diff --git a/coin/provisioning/qtci-macos-14-arm/24-pyenv.sh b/coin/provisioning/qtci-macos-14-arm/24-pyenv.sh index 3a7a8f77..f0f36e41 100755 --- a/coin/provisioning/qtci-macos-14-arm/24-pyenv.sh +++ b/coin/provisioning/qtci-macos-14-arm/24-pyenv.sh @@ -1,49 +1,8 @@ #!/usr/bin/env bash +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -############################################################################# -## -## Copyright (C) 2021 The Qt Company Ltd. -## Copyright (C) 2017 Pelagicore AG -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 3 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL3 included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 3 requirements -## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 2.0 or (at your option) the GNU General -## Public license version 3 or any later version approved by the KDE Free -## Qt Foundation. The licenses are as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-2.0.html and -## https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +set -ex -# This script installs python3 - -# shellcheck source=../common/unix/SetEnvVar.sh -source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" - -# Try with default -/opt/homebrew/bin/brew install pyenv +# shellcheck source=../common/macos/install-pyenv.sh +source "${BASH_SOURCE%/*}/../common/macos/install-pyenv.sh" diff --git a/coin/provisioning/qtci-macos-15-arm/24-pyenv.sh b/coin/provisioning/qtci-macos-15-arm/24-pyenv.sh index 3a7a8f77..f0f36e41 100755 --- a/coin/provisioning/qtci-macos-15-arm/24-pyenv.sh +++ b/coin/provisioning/qtci-macos-15-arm/24-pyenv.sh @@ -1,49 +1,8 @@ #!/usr/bin/env bash +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -############################################################################# -## -## Copyright (C) 2021 The Qt Company Ltd. -## Copyright (C) 2017 Pelagicore AG -## Contact: https://www.qt.io/licensing/ -## -## This file is part of the provisioning scripts of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 3 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL3 included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 3 requirements -## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 2.0 or (at your option) the GNU General -## Public license version 3 or any later version approved by the KDE Free -## Qt Foundation. The licenses are as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-2.0.html and -## https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# +set -ex -# This script installs python3 - -# shellcheck source=../common/unix/SetEnvVar.sh -source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" - -# Try with default -/opt/homebrew/bin/brew install pyenv +# shellcheck source=../common/macos/install-pyenv.sh +source "${BASH_SOURCE%/*}/../common/macos/install-pyenv.sh" diff --git a/coin/provisioning/qtci-macos-26-arm/24-pyenv.sh b/coin/provisioning/qtci-macos-26-arm/24-pyenv.sh new file mode 100755 index 00000000..f0f36e41 --- /dev/null +++ b/coin/provisioning/qtci-macos-26-arm/24-pyenv.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +set -ex + +# shellcheck source=../common/macos/install-pyenv.sh +source "${BASH_SOURCE%/*}/../common/macos/install-pyenv.sh"