fix: install pip deps in CI with --break-system-packages
Python 3.12 (PEP 668) blocks bare pip installs into the system. Move the install step into the CI script and drop the self-install fallback from the Python script. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ sync-elo:
|
|||||||
only:
|
only:
|
||||||
- schedules
|
- schedules
|
||||||
script:
|
script:
|
||||||
|
- pip3 install --break-system-packages requests openpyxl -q
|
||||||
- python3 scripts/sync-elo.py
|
- python3 scripts/sync-elo.py
|
||||||
- git config user.email ci@gateway-gamers.net
|
- git config user.email ci@gateway-gamers.net
|
||||||
- 'git config user.name "GG CI Bot"'
|
- 'git config user.name "GG CI Bot"'
|
||||||
|
|||||||
+2
-9
@@ -10,15 +10,8 @@ import sys
|
|||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
try:
|
import requests
|
||||||
import requests
|
import openpyxl
|
||||||
import openpyxl
|
|
||||||
except ImportError:
|
|
||||||
print("Installing dependencies…", flush=True)
|
|
||||||
import subprocess
|
|
||||||
subprocess.check_call([sys.executable, "-m", "pip", "install", "requests", "openpyxl", "-q"])
|
|
||||||
import requests
|
|
||||||
import openpyxl
|
|
||||||
|
|
||||||
DOWNLOAD_URL = (
|
DOWNLOAD_URL = (
|
||||||
"https://excel.officeapps.live.com/x/_layouts/XlFileHandler.aspx"
|
"https://excel.officeapps.live.com/x/_layouts/XlFileHandler.aspx"
|
||||||
|
|||||||
Reference in New Issue
Block a user