ci: extract pip bootstrapping into compilation/ensure_pip.py to fix yaml scalar parsing
CI Test Suite / Run Component Tests & Pipeline Verification (push) Failing after 1m29s
CI Test Suite / Run Component Tests & Pipeline Verification (push) Failing after 1m29s
This commit is contained in:
+1
-22
@@ -22,28 +22,7 @@ jobs:
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
# 1. Ensure Python3 is present; try apt-get only if missing
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -y || true
|
||||
apt-get install -y --no-install-recommends python3 || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# 2. Bootstrap pip via ensurepip or version-appropriate get-pip.py
|
||||
if ! python3 -m pip --version >/dev/null 2>&1; then
|
||||
python3 -m ensurepip --default-pip 2>/dev/null || python3 -c "
|
||||
import sys, urllib.request, subprocess
|
||||
ver = f'{sys.version_info.major}.{sys.version_info.minor}'
|
||||
url = f'https://bootstrap.pypa.io/pip/{ver}/get-pip.py' if sys.version_info < (3, 10) else 'https://bootstrap.pypa.io/get-pip.py'
|
||||
print(f'[*] Downloading get-pip.py from {url} for Python {ver}...')
|
||||
urllib.request.urlretrieve(url, '/tmp/get-pip.py')
|
||||
subprocess.run([sys.executable, '/tmp/get-pip.py', '--break-system-packages'])
|
||||
" || true
|
||||
fi
|
||||
|
||||
# 3. Upgrade pip and install project dependencies
|
||||
python3 compilation/ensure_pip.py
|
||||
python3 -m pip install --upgrade pip --break-system-packages 2>/dev/null || python3 -m pip install --upgrade pip 2>/dev/null || true
|
||||
python3 -m pip install -r compilation/requirements.txt --break-system-packages 2>/dev/null || python3 -m pip install -r compilation/requirements.txt
|
||||
|
||||
|
||||
@@ -21,28 +21,7 @@ jobs:
|
||||
|
||||
- name: Install Python and Build Dependencies
|
||||
run: |
|
||||
# 1. Ensure Python3 is present; try apt-get only if missing
|
||||
if ! command -v python3 >/dev/null 2>&1; then
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -y || true
|
||||
apt-get install -y --no-install-recommends python3 || true
|
||||
fi
|
||||
fi
|
||||
|
||||
# 2. Bootstrap pip via ensurepip or version-appropriate get-pip.py
|
||||
if ! python3 -m pip --version >/dev/null 2>&1; then
|
||||
python3 -m ensurepip --default-pip 2>/dev/null || python3 -c "
|
||||
import sys, urllib.request, subprocess
|
||||
ver = f'{sys.version_info.major}.{sys.version_info.minor}'
|
||||
url = f'https://bootstrap.pypa.io/pip/{ver}/get-pip.py' if sys.version_info < (3, 10) else 'https://bootstrap.pypa.io/get-pip.py'
|
||||
print(f'[*] Downloading get-pip.py from {url} for Python {ver}...')
|
||||
urllib.request.urlretrieve(url, '/tmp/get-pip.py')
|
||||
subprocess.run([sys.executable, '/tmp/get-pip.py', '--break-system-packages'])
|
||||
" || true
|
||||
fi
|
||||
|
||||
# 3. Upgrade pip and install pyinstaller + dependencies
|
||||
python3 compilation/ensure_pip.py
|
||||
python3 -m pip install --upgrade pip --break-system-packages 2>/dev/null || python3 -m pip install --upgrade pip 2>/dev/null || true
|
||||
python3 -m pip install pyinstaller -r compilation/requirements.txt --break-system-packages 2>/dev/null || python3 -m pip install pyinstaller -r compilation/requirements.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user