Skip to content

Commit

Permalink
Try putting uv's real python path into $PATH for old CentOS
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Oberbrunner <[email protected]>
  • Loading branch information
garyo committed Dec 13, 2024
1 parent a750bd7 commit 204cd09
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,15 @@ jobs:
source ~/.local/bin/env
echo After sourcing uv env: "$PATH"
uv python install --preview 3.11
# Add symlinks for python3 and python
(cd ~/.local/bin; ln -sf python3.11 python3; ln -sf python3.11 python)
# Python is in $(uv python dir)/cpython-*/bin
# uv also installs a symlink in $HOME/.local/bin but because
# that is only a symlink, it causes problems with pip and venv.
# As a workaround, prepend the actual bin dir to $PATH.
UV_PYTHON_BIN=$(uv python dir)/cpython*/bin
PATH=$UV_PYTHON_BIN:$PATH
# Save updated path
echo "PATH=$PATH" >> $GITHUB_ENV
echo "PYTHONHOME=$(dirname $(dirname $(realpath $(which python))))" >> $GITHUB_ENV
- name: Check python, uv paths
run: |
Expand Down

0 comments on commit 204cd09

Please sign in to comment.