Skip to content

Commit

Permalink
build: faster with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyoon committed Jun 11, 2024
1 parent 7551e3f commit 287e7f3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/build_with_uv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

if [[ $# -eq 0 ]]; then
echo "Usage: $0 <path-to-venv>"
exit 1
fi

path_to_venv="$1"

if [[ -f "$path_to_venv" ]]; then
echo "Error: $path_to_venv is a file"
exit 1
fi

if [[ ! -d "$path_to_venv" ]]; then
uv venv "$path_to_venv"
fi

source "$path_to_venv/bin/activate"
uv pip install .
mkdir -p "$HOME/.local/bin"
ln -sf "$path_to_venv/bin/python-import" "$HOME/.local/bin"

0 comments on commit 287e7f3

Please sign in to comment.