diff --git a/docs/build/macos.md b/docs/build/macos.md index 70d055a13e..7870c8d04b 100644 --- a/docs/build/macos.md +++ b/docs/build/macos.md @@ -48,11 +48,15 @@ These dependencies are also listed below if you'd prefer to install manually. ## Shared Dependencies -* Shared: HomeBrew, Bash 5.0+, jq, Python 3, Meson, Ninja, coreutils, Pandoc +* Shared: HomeBrew, Bash 5.0+, jq, Python 2.7, Python 3, Meson, Ninja, coreutils, Pandoc ```shell /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - brew install bash jq python3 meson ninja coreutils pandoc + brew install bash jq python3 meson ninja coreutils pandoc pyenv + # Python 2.7 required for DeviceKit (among others?) at present + pyenv install 2.7.18 + pyenv global 2.7.18 + echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile ``` On M1 only (as greadlink is not on the path otherwise in XCode): diff --git a/resources/devbox/macos/keyman.macos.env.sh b/resources/devbox/macos/keyman.macos.env.sh index b6fc5b83d8..34acdfce0f 100644 --- a/resources/devbox/macos/keyman.macos.env.sh +++ b/resources/devbox/macos/keyman.macos.env.sh @@ -17,3 +17,6 @@ export PATH=$ANDROID_HOME/build-tools/30.0.3:$PATH export PATH="/usr/local/opt/openjdk@8/bin:$PATH" export JAVA_HOME=/usr/local/opt/openjdk@8 + +# Python 2.7 +eval "$(pyenv init --path)" diff --git a/resources/devbox/macos/macos.sh b/resources/devbox/macos/macos.sh index ca5568806a..19ebea01bc 100755 --- a/resources/devbox/macos/macos.sh +++ b/resources/devbox/macos/macos.sh @@ -144,7 +144,7 @@ which brew || ( ## Install devchain components -BREW_ALL="bash jq python3 meson ninja coreutils" +BREW_ALL="bash jq python3 meson ninja coreutils pyenv" BREW_WEB="node emscripten openjdk@8" BREW_IOS="swiftlint carthage" BREW_MACOS="carthage cocoapods" @@ -162,6 +162,10 @@ $REQUIRE_MACOS && brew install $BREW_MACOS $REQUIRE_PANDOC && brew install pandoc $REQUIRE_SENTRYCLI && brew install getsentry/tools/sentry-cli +# Add python 2.7.18 from pyenv +pyenv install 2.7.18 +pyenv global 2.7.18 + # Install WINE $REQUIRE_KMCOMP && ( brew tap homebrew/cask-versions