Skip to content

Commit e0bb24d

Browse files
timsaucerclaude
andcommitted
ci: point uv at the venv interpreter by path for free-threaded jobs
Activating the venv and passing --active still let 'uv sync' run its own interpreter discovery, which skips free-threaded builds and re-picked the system 3.12, recreating .venv and breaking the cp313t/cp314t wheel install. Pass the venv's own interpreter (.venv/bin/python) explicitly to 'uv sync', 'uv pip install', and 'uv run' so every step stays in the free-threaded environment created by 'uv venv'. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b4b80b1 commit e0bb24d

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,21 @@ jobs:
8181
- name: Install from pre-built wheels
8282
run: |
8383
set -x
84-
# Create the venv with the setup-python interpreter, then activate
85-
# it so every uv command targets that same .venv. Using UV_PYTHON
86-
# instead diverges: `uv sync` populates .venv while `uv pip install`
87-
# targets the bare interpreter, so the datafusion wheel never lands
88-
# in .venv. `--active` stops `uv sync` from discovering and
89-
# recreating the env with the system 3.12.
84+
# Create the venv with the setup-python interpreter, then point
85+
# every uv command explicitly at the venv's own interpreter.
86+
# uv's interpreter discovery skips free-threaded builds unless
87+
# asked by exact path, so plain `uv sync` (even with an activated
88+
# venv or --active) re-picks the system 3.12 and recreates .venv.
89+
# Targeting .venv/bin/python keeps sync and pip install in the
90+
# same 3.13t/3.14t environment as the cp313t/cp314t wheel.
9091
uv venv --python "${{ steps.setup-python.outputs.python-path }}"
91-
source .venv/bin/activate
92-
uv sync --active --dev --no-install-package datafusion
92+
VENV_PY="$PWD/.venv/bin/python"
93+
uv sync --python "$VENV_PY" --dev --no-install-package datafusion
9394
WHEELS=$(find wheels/ -name "*.whl")
9495
if [ -n "$WHEELS" ]; then
9596
echo "Installing wheels:"
9697
echo "$WHEELS"
97-
uv pip install wheels/*.whl
98+
uv pip install --python "$VENV_PY" wheels/*.whl
9899
else
99100
echo "ERROR: No wheels found!"
100101
exit 1
@@ -108,7 +109,9 @@ jobs:
108109
PYTHON_GIL: ${{ matrix.freethreaded && '0' || '' }}
109110
run: |
110111
git submodule update --init
111-
uv run --no-project pytest -v --import-mode=importlib
112+
# Use the .venv interpreter directly; uv discovery would skip the
113+
# free-threaded build and re-pick the system 3.12 (see install step).
114+
uv run --python "$PWD/.venv/bin/python" --no-project pytest -v --import-mode=importlib
112115
113116
# FFI + TPC-H examples only need to run once; gate to abi3 entries.
114117
- name: FFI unit tests

0 commit comments

Comments
 (0)