diff options
| author | Simo Fält <simo.falt@qt.io> | 2025-09-09 10:47:12 +0300 |
|---|---|---|
| committer | Simo Fält <simo.falt@qt.io> | 2025-09-16 08:47:49 +0300 |
| commit | 2caee4eb927bb5a25a07e42eb60f4daf74cdeab9 (patch) | |
| tree | 4b7619b72c9abcdba2ce32df3d529d636305ae0f | |
| parent | 1ecaaa373c769ea16a9e5a24cde6f403ec52357f (diff) | |
COIN: Update python from 3.9 to 3.13 on macOS 15
Change-Id: I1cf5d05d87eda1a3e519958d6b5ce59cdff1dd00
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| -rw-r--r-- | coin/instructions/common_environment.yaml | 43 | ||||
| -rw-r--r-- | coin/instructions_utils.py | 6 |
2 files changed, 48 insertions, 1 deletions
diff --git a/coin/instructions/common_environment.yaml b/coin/instructions/common_environment.yaml index 949eecad3..3ee04a444 100644 --- a/coin/instructions/common_environment.yaml +++ b/coin/instructions/common_environment.yaml @@ -328,6 +328,49 @@ instructions: condition: property property: host.osVersion not_in_values: [RHEL_8_6, RHEL_8_8, RHEL_8_10] + + - type: ExecuteCommand + command: "pyenv install 3.13.7" + maxTimeInSeconds: 14400 + maxTimeBetweenOutput: 1200 + ignoreExitCode: true + enable_if: + condition: and + conditions: + - condition: property + property: host.osVersion + equals_value: MacOS_15 + - condition: property + property: host.arch + equals_value: ARM64 + userMessageOnFailure: > + Failed to install python 3.13 + - type: PrependToEnvironmentVariable + variableName: PATH + variableValue: "/Users/qt/.pyenv/versions/3.13.7/bin:" + enable_if: + condition: and + conditions: + - condition: property + property: host.osVersion + equals_value: MacOS_15 + - condition: property + property: host.arch + equals_value: ARM64 + - type: EnvironmentVariable + variableName: interpreter + variableValue: "python3.13" + enable_if: + condition: and + conditions: + - condition: property + property: host.osVersion + equals_value: MacOS_15 + - condition: property + property: host.arch + equals_value: ARM64 + + # ToDo: can be removed after 3.11 is available on qt5#3.8 on macOS # start of ToDo - type: ExecuteCommand diff --git a/coin/instructions_utils.py b/coin/instructions_utils.py index 52c8211e0..0337a0a4c 100644 --- a/coin/instructions_utils.py +++ b/coin/instructions_utils.py @@ -148,8 +148,12 @@ def setup_virtualenv(python, exe, env, pip, log, ci): # Within Ubuntu 24.04 one can't install anything with pip to outside of # virtual env. Trust that we already have proper virtualenv installed. if os.environ.get("HOST_OSVERSION_COIN") != "ubuntu_24_04": + virtualenv_version = "20.7.2" + # 20.7.2 is too old for 3.13 + if sys.version_info[1] > 12: + virtualenv_version = "20.32.0" run_instruction( - [str(python), "-m", "pip", "install", "--user", "virtualenv==20.7.2"], + [str(python), "-m", "pip", "install", "--user", "virtualenv==" + virtualenv_version], "Failed to pin virtualenv", ) # installing to user base might not be in PATH by default. |
