Skip to content

Commit

Permalink
fix(macos): use pyenv to install python
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Oct 31, 2023
1 parent 21c111e commit 3e8e202
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
os:
- macos-11
- macos-12
- macos-13
- windows-2019
- windows-2022
- ubuntu-20.04
Expand Down
14 changes: 5 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,8 @@ runs:
shell: bash
if: ${{ inputs.python-version == '2.7' && runner.os == 'macOS' }}
run: |
python_version=$(python --version 2>&1)
echo "Python version: ${python_version}"
if [[ "${python_version}" == *"Python 2.7"* ]]; then
echo "${python_version} already installed, nothing to do"
else
echo "Python 2.7 not installed"
exit 1
fi
brew install pyenv
pyenv install 2.7.18
- name: Setup Python Environment
if: ${{ inputs.python-version == '2.7' }}
Expand All @@ -76,6 +69,9 @@ runs:
venv_base_path="/tmp/python27/venv"
venv_dir="bin"
elif [[ "${{ runner.os }}" == "macOS" ]]; then
export PATH="$(pyenv root)/shims:${PATH}"
# pyenv init
pyenv shell 2.7.18
venv_base_path="/tmp/python27/venv"
venv_dir="bin"
fi
Expand Down

0 comments on commit 3e8e202

Please sign in to comment.