From: Claudio Cambra Date: Wed, 19 Jun 2024 10:01:51 +0000 (+0800) Subject: Set up python if missing in mac builder script X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~169 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=283c1c3ba0fc5ebbfaf5511a7e40b061bd02d152;p=nextcloud-desktop.git Set up python if missing in mac builder script Signed-off-by: Claudio Cambra --- diff --git a/admin/osx/craft-client.swift b/admin/osx/craft-client.swift index 9f8766fec..4d8461aa3 100644 --- a/admin/osx/craft-client.swift +++ b/admin/osx/craft-client.swift @@ -81,3 +81,20 @@ if commandExists("inkscape") { print("Inkscape installed.") } +if commandExists("python3") { + print("Python 3 is installed.") +} else { + if commandExists("pyenv") { + print("Pyenv is installed.") + } else { + guard shell("brew install pyenv") == 0 else { + print("Failed to install Pyenv.") + exit(1) + } + } + + guard shell ("pyenv install 3.12.4") == 0 else { + print("Failed to install Python 3.") + exit(1) + } +}