Skip to content

Commit 57a4469

Browse files
committed
CI: Re-add Py2.7 support by using the pre-installed system Python 2.7.
1 parent 96c5842 commit 57a4469

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,21 @@ jobs:
160160

161161
- name: Set up Python
162162
uses: actions/setup-python@v4
163+
if: startsWith(matrix.python-version, '3.')
163164
with:
164165
python-version: ${{ matrix.python_version }}
165166

167+
- name: Set up Python2 (Linux)
168+
if: matrix.python-version == '2.7' && startsWith(matrix.os, 'ubuntu')
169+
run: |
170+
sudo ln -fs python2 /usr/bin/python
171+
sudo apt-get update
172+
sudo apt-get install python-setuptools python2-dev
173+
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
174+
sudo python2 get-pip.py
175+
ls -l /usr/bin/pip* /usr/local/bin/pip*
176+
which pip
177+
166178
- name: Install dependencies
167179
run: |
168180
python -m pip install -U pip setuptools wheel

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{35,36,37,38,39,310,311,312}
2+
envlist = py{27,35,36,37,38,39,310,311,312}
33

44
[testenv]
55
platform =

0 commit comments

Comments
 (0)