From c586ada54ba7b19557421a49ff059bb204c7b51b Mon Sep 17 00:00:00 2001 From: Hubert Kario Date: Wed, 28 Jun 2023 19:24:43 +0200 Subject: [PATCH] fix CI for python2.7 --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cf0cee2..a3b218cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,10 +160,20 @@ jobs: run: git fetch origin master:refs/remotes/origin/master - name: Set up Python ${{ matrix.python-version }} # we use containers to use the native python version from them - if: ${{ !matrix.container }} + if: ${{ !matrix.container && matrix.python-version != '2.7' }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Ensure python 2.7 + if: matrix.python-version == '2.7' + run: | + sudo apt-get update + sudo apt-get install -y \ + python2.7 python2.7-dev python-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 - name: Display Python version run: python -c "import sys; print(sys.version)" - name: Display installed python package versions