Fix python2.7 Action workflows

Replicated from the jellyfin-kodi repo
5c5b1d14cb
This commit is contained in:
Abby Gourlay 2023-07-30 21:02:32 +01:00
parent 1f293845ea
commit 5e330658ec
2 changed files with 25 additions and 0 deletions

View File

@ -30,10 +30,23 @@ jobs:
queries: +security-and-quality
- name: Set up Python
if: matrix.version != '2.7'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
- name: Set up Python 2.7
if: matrix.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
- name: Autobuild
uses: github/codeql-action/autobuild@v2

View File

@ -23,10 +23,22 @@ jobs:
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.py_version }}
if: matrix.py_version != '2.7'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_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
- name: Install dependencies
run: |
python -m pip install --upgrade pip