Skip to content

Commit b4b80b1

Browse files
timsaucerclaude
andcommitted
ci: install datafusion wheel into the activated .venv
Setting UV_PYTHON as a step env split the install across two environments: 'uv sync' populated .venv while 'uv pip install' targeted the bare setup-python interpreter, so the datafusion wheel never landed in .venv and 'import datafusion' failed under pytest. Pin the interpreter at 'uv venv --python', activate the venv, and pass --active to 'uv sync' so sync and pip install both target the same .venv. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6f432c2 commit b4b80b1

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,17 @@ jobs:
7979
path: wheels/
8080

8181
- name: Install from pre-built wheels
82-
env:
83-
# Pin every uv command to the interpreter from setup-python.
84-
# Without this, `uv sync` ignores the existing .venv, runs its
85-
# own discovery, and grabs the system 3.12, producing a
86-
# wheel/ABI mismatch on free-threaded jobs.
87-
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
8882
run: |
8983
set -x
90-
uv venv
91-
uv sync --dev --no-install-package datafusion
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.
90+
uv venv --python "${{ steps.setup-python.outputs.python-path }}"
91+
source .venv/bin/activate
92+
uv sync --active --dev --no-install-package datafusion
9293
WHEELS=$(find wheels/ -name "*.whl")
9394
if [ -n "$WHEELS" ]; then
9495
echo "Installing wheels:"

0 commit comments

Comments
 (0)