3030 echo >> /Users/runner/.bash_profile
3131 echo 'eval "$(/usr/local/bin/brew shellenv bash)"' >> /Users/runner/.bash_profile
3232 eval "$(/usr/local/bin/brew shellenv bash)"
33- brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo python@3.11
33+ brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo
34+ brew install python@3.11 || true
3435
3536 - name : Runs all the stages in the shell
3637 if : matrix.os == 'ubuntu-latest'
@@ -48,13 +49,15 @@ jobs:
4849 shell : arch -x86_64 bash -e {0}
4950 run : |
5051 eval "$(/usr/local/bin/brew shellenv bash)"
52+ PY311_PREFIX="$(brew --prefix python@3.11)"
5153
5254 # diagnostic - check if the runner is using correct python
5355 mkdir -p "$PWD/python-shims"
54- ln -sf /usr/local/opt/python@3.11/bin/python3.11 "$PWD/python-shims/python"
55- ln -sf /usr/local/opt/python@3.11/bin/python3.11 "$PWD/python-shims/python3"
56- ln -sf /usr/local/opt/python@3.11/bin/python3.11-config "$PWD/python-shims/python-config"
57- ln -sf /usr/local/opt/python@3.11/bin/python3.11-config "$PWD/python-shims/python3-config"
56+ ln -sf "$PY311_PREFIX/bin/python3.11" "$PWD/python-shims/python"
57+ ln -sf "$PY311_PREFIX/bin/python3.11" "$PWD/python-shims/python3"
58+ ln -sf "$PY311_PREFIX/bin/python3.11-config" "$PWD/python-shims/python-config"
59+ ln -sf "$PY311_PREFIX/bin/python3.11-config" "$PWD/python-shims/python3-config"
60+ export PATH="$PWD/python-shims:$PY311_PREFIX/bin:$PATH"
5861 export PATH="$PWD/python-shims:/usr/local/opt/python@3.11/bin:$PATH"
5962 python3 --version
6063 python3 -c "import distutils; print(distutils.__file__)"
0 commit comments