Skip to content

Commit

Permalink
ci: Fix Python 2.7 build
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed Jul 1, 2023
1 parent 9e0e7ff commit 50ca7c3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
# 2.7 not on setup-python: https://github.com/actions/setup-python/issues/672
- if: matrix.py_version != '2.7'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python 2.7
if: matrix.py_version == '2.7'
run: |
sudo apt-get update
sudo apt-get install -y python2.7 python2.7-dev python2-pip-whl
sudo ln -sf python2.7 /usr/bin/python
export PYTHONPATH=$(echo /usr/share/python-wheels/pip-*py2*.whl)
sudo --preserve-env=PYTHONPATH python -m pip install --upgrade pip setuptools wheel
sudo chown -R "$USER" /usr/local/lib/python2.7
- run: python --version

- run: pip install -U pip
Expand Down

0 comments on commit 50ca7c3

Please sign in to comment.