CI: use venv for Python tests to isolate setuptools from system Python
deadsnakes python3.12 sees system python3.10's setuptools at /usr/lib/python3/dist-packages and skips installation, leaving python3.12 without setuptools. A venv gets its own site-packages so pip/setuptools are properly present for http-ece's legacy setup.py build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -86,16 +86,17 @@ jobs:
|
||||
apt-get install -y -qq python3.12 python3.12-dev python3.12-venv python3-pip git
|
||||
python3.12 -m ensurepip --upgrade
|
||||
|
||||
- name: Install setuptools and pre-build legacy deps
|
||||
run: |
|
||||
python3.12 -m pip install setuptools wheel
|
||||
python3.12 -m pip install --no-build-isolation http-ece
|
||||
- name: Create virtual environment
|
||||
run: python3.12 -m venv /opt/venv
|
||||
|
||||
- name: Install package with dev deps
|
||||
run: python3.12 -m pip install -e ".[dev]"
|
||||
run: |
|
||||
/opt/venv/bin/pip install --upgrade pip setuptools wheel
|
||||
/opt/venv/bin/pip install --no-build-isolation http-ece
|
||||
/opt/venv/bin/pip install -e ".[dev]"
|
||||
|
||||
- name: Run tests
|
||||
run: python3.12 -m pytest tests/ -v
|
||||
run: /opt/venv/bin/python -m pytest tests/ -v
|
||||
|
||||
build:
|
||||
name: Build & push image
|
||||
|
||||
Reference in New Issue
Block a user