From 4327b9f858e41b8ba6a59ff12fd149a894957474 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 9 Mar 2026 22:47:08 -0400 Subject: [PATCH] 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 --- .forgejo/workflows/ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 9f31e0e..752dd8e 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -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