Skip to content

Commit 788f269

Browse files
authored
Fix python 2.7 install
1 parent 43eb776 commit 788f269

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/CI.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,25 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8]
16+
python-version: ['2.7', '3.x']
1717

1818
steps:
1919
- uses: actions/checkout@v2
2020
with:
2121
fetch-depth: 0
2222
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
23+
if: matrix.python-version != '2.7'
24+
uses: actions/setup-python@v4
2425
with:
2526
python-version: ${{ matrix.python-version }}
27+
- name: Set up Python 2
28+
if: matrix.python-version == '2.7'
29+
run: |
30+
sudo rm -f $(which python) $(which pip)
31+
sudo apt-get install python2.7-dev
32+
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
33+
python2.7 get-pip.py
34+
sudo ln -sf "$(which python2.7)" "$(dirname $(which python2.7))/python"
2635
- name: Install dependencies
2736
run: |
2837
pip install -U pip setuptools wheel

0 commit comments

Comments
 (0)