Skip to content

Commit 677f96c

Browse files
committed
fix python mismatch in macOS runner
1 parent 9d9edee commit 677f96c

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎.github/workflows/build.yml‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
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
33+
brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config texinfo python@3.11
3434
3535
- name: Runs all the stages in the shell
3636
if: matrix.os == 'ubuntu-latest'
@@ -47,6 +47,19 @@ jobs:
4747
if: matrix.os == 'macos-15-intel'
4848
shell: arch -x86_64 bash -e {0}
4949
run: |
50+
eval "$(/usr/local/bin/brew shellenv bash)"
51+
52+
# diagnostic - check if the runner is using correct python
53+
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"
58+
export PATH="$PWD/python-shims:/usr/local/opt/python@3.11/bin:$PATH"
59+
python3 --version
60+
python3 -c "import distutils; print(distutils.__file__)"
61+
python3-config --prefix
62+
5063
mkdir $PWD/ps3dev
5164
export PS3DEV=$PWD/ps3dev
5265
export PSL1GHT=$PS3DEV

0 commit comments

Comments
 (0)