ci: support python 3.9 legacy get-pip bootstrap endpoint dynamically
This commit is contained in:
@@ -31,9 +31,16 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
|
||||
# 2. Bootstrap pip via ensurepip or get-pip.py
|
||||
# 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 urllib.request; urllib.request.urlretrieve('https://bootstrap.pypa.io/get-pip.py', '/tmp/get-pip.py')" && python3 /tmp/get-pip.py --break-system-packages 2>/dev/null || python3 /tmp/get-pip.py 2>/dev/null || true)
|
||||
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
|
||||
|
||||
@@ -30,9 +30,16 @@ jobs:
|
||||
fi
|
||||
fi
|
||||
|
||||
# 2. Bootstrap pip via ensurepip or get-pip.py
|
||||
# 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 urllib.request; urllib.request.urlretrieve('https://bootstrap.pypa.io/get-pip.py', '/tmp/get-pip.py')" && python3 /tmp/get-pip.py --break-system-packages 2>/dev/null || python3 /tmp/get-pip.py 2>/dev/null || true)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user