Skip to content

Commit

Permalink
Use system Py2.7 on Ubuntu since "actions/setup-python" not longer pr…
Browse files Browse the repository at this point in the history
…ovides it.
  • Loading branch information
scoder committed Oct 4, 2023
1 parent 34a43bb commit e337e1b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,22 @@ jobs:
run: git submodule update --init --recursive

- name: Set up Python ${{ matrix.python-version }}
if: !startsWith(matrix.os, 'ubuntu') || startsWith(matrix.python-version, '3.') || startsWith(matrix.python-version, 'pypy')
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set up Python2 (Linux)
if: matrix.python-version == '2.7' && startsWith(matrix.os, 'ubuntu')
run: |
sudo ln -fs python2 /usr/bin/python
sudo apt-get update
sudo apt-get install python-setuptools python2.7 python2.7-dev
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
ls -l /usr/bin/pip* /usr/local/bin/pip*
which pip
- name: Set up Python packages
run: |
python -m pip install -U ${{ contains(matrix.python-version, '-dev') && 'pip setuptools' || '"pip<21" "setuptools<45"' }}
Expand Down

0 comments on commit e337e1b

Please sign in to comment.