Skip to content

Commit

Permalink
Use python2.7 package instead of removed Python 2.7 binary of setup-p…
Browse files Browse the repository at this point in the history
…ython
  • Loading branch information
jun66j5 committed Sep 26, 2023
1 parent 663216d commit 27457dc
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 47 deletions.
7 changes: 3 additions & 4 deletions .github/posix-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ _EOS_
case "$MATRIX_OS" in
ubuntu-*)
sudo apt-get update -qq
sudo apt-get install -qq -y subversion
sudo apt-get install -qq -y python2.7 python2.7-dev python2-pip-whl \
python2-setuptools-whl virtualenv subversion
;;
macos-*)
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
Expand All @@ -135,9 +136,7 @@ case "$MATRIX_OS" in
esac

venvdir="$HOME/venv"
python -m ensurepip
python -m pip install virtualenv
python -m virtualenv "$venvdir"
virtualenv -p /usr/bin/python2.7 "$venvdir"
python="$venvdir/bin/python"
. "$venvdir/bin/activate"
"$python" -m pip install --upgrade pip setuptools
Expand Down
12 changes: 9 additions & 3 deletions .github/posix-test-minimum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

set -ex

case "$MATRIX_OS" in
ubuntu-*)
sudo apt-get update -qq
sudo apt-get install -qq -y python2.7 python2.7-dev python2-pip-whl \
python2-setuptools-whl virtualenv
;;
esac

venvdir="$HOME/venv"
python -m ensurepip
python -m pip install virtualenv
python -m virtualenv "$venvdir"
virtualenv -p /usr/bin/python2.7 "$venvdir"
. "$venvdir/bin/activate"
python="$venvdir/bin/python"
"$python" -m pip install --upgrade pip setuptools
Expand Down
7 changes: 3 additions & 4 deletions .github/posix-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ run_tests() {
case "$MATRIX_OS" in
ubuntu-*)
sudo apt-get update -qq
sudo apt-get install -qq -y subversion
sudo apt-get install -qq -y python2.7 python2.7-dev python2-pip-whl \
python2-setuptools-whl virtualenv subversion
;;
macos-*)
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
Expand All @@ -126,9 +127,7 @@ case "$MATRIX_OS" in
esac

venvdir="$HOME/venv"
python -m ensurepip
python -m pip install virtualenv
python -m virtualenv "$venvdir"
virtualenv -p /usr/bin/python2.7 "$venvdir"
python="$venvdir/bin/python"
. "$venvdir/bin/activate"
"$python" -m pip install --upgrade pip setuptools
Expand Down
12 changes: 9 additions & 3 deletions .github/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

set -ex

case "$MATRIX_OS" in
ubuntu-*)
sudo apt-get update -qq
sudo apt-get install -qq -y python2.7 python2.7-dev python2-pip-whl \
python2-setuptools-whl virtualenv
;;
esac

venvdir="$HOME/venv"
python -m ensurepip
python -m pip install virtualenv
python -m virtualenv "$venvdir"
virtualenv -p /usr/bin/python2.7 "$venvdir"
. "$venvdir/bin/activate"
python -m pip install --upgrade pip setuptools
pip install -r requirements-release.txt
Expand Down
42 changes: 9 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,19 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04]
python-version: ['2.7']
tests: [functional]

env:
MATRIX_OS: ${{ matrix.os }}
MATRIX_TESTS: ${{ matrix.tests }}

steps:

- name: Checkout
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set up pip cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -73,15 +69,10 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, python-version: '2.7', tracdb: '', tests: functional}
- {os: ubuntu-22.04, python-version: '2.7', tracdb: sqlite, tests: functional}
- {os: ubuntu-22.04, python-version: '2.7', tracdb: postgresql, tests: functional}
- {os: ubuntu-22.04, python-version: '2.7', tracdb: mysql, tests: functional}
- {os: macos-12, python-version: '2.7', tracdb: '', tests: functional}
- {os: macos-12, python-version: '2.7', tracdb: sqlite}
- {os: macos-12, python-version: '2.7', tracdb: postgresql}
- {os: macos-12, python-version: '2.7', tracdb: mysql}
os: [ubuntu-22.04]
python-version: ['2.7']
tests: [functional]
tracdb: ['', sqlite, postgresql, mysql]

env:
MATRIX_OS: ${{ matrix.os }}
Expand All @@ -95,11 +86,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set up pip cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -138,9 +124,8 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-22.04, python-version: '2.7'}
- {os: macos-12, python-version: '2.7'}
os: [ubuntu-22.04]
python-version: ['2.7']

env:
MATRIX_OS: ${{ matrix.os }}
Expand All @@ -159,11 +144,6 @@ jobs:
ref: v1.4
path: py3c

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set up pip cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -196,6 +176,7 @@ jobs:
needs: [posix-test-minimum, posix-test]

env:
MATRIX_OS: ${{ matrix.os }}
PIP_NO_PYTHON_VERSION_WARNING: '1'
PIP_DISABLE_PIP_VERSION_CHECK: '1'

Expand All @@ -204,11 +185,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set up pip cache
uses: actions/cache@v3
with:
Expand Down

0 comments on commit 27457dc

Please sign in to comment.