From 037aad0870b9d2424ae6244c2145492aabe438c8 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Sun, 10 Aug 2025 17:47:44 -0700 Subject: [PATCH] fix: ensure virtual environment uses correct Python version in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix issue where uv venv was creating virtual environments with a different Python version than specified in the matrix, causing wheel compatibility errors. The problem occurred when the system had multiple Python versions and uv venv defaulted to a different version than intended. Changes: - Add --python ${{ matrix.python }} flag to uv venv command - Ensures virtual environment matches the matrix-specified Python version - Fixes "The wheel is compatible with CPython 3.X but you're using CPython 3.Y" errors This ensures wheel installation selects and installs the correctly built wheels that match the runtime Python version. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/build-reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.yml index 611ea6c..15e1e71 100644 --- a/.github/workflows/build-reusable.yml +++ b/.github/workflows/build-reusable.yml @@ -238,8 +238,8 @@ jobs: - name: Install built packages for testing run: | - # Create a virtual environment - uv venv + # Create a virtual environment with the correct Python version + uv venv --python ${{ matrix.python }} source .venv/bin/activate || source .venv/Scripts/activate # Install the built wheels directly without checking PyPI