From bca333586eac086e1189f4dd0b273a4d7db69fb9 Mon Sep 17 00:00:00 2001 From: Cal Jacobson Date: Sat, 14 Sep 2024 21:58:28 -0500 Subject: [PATCH] use uv in .envrc --- .envrc | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.envrc b/.envrc index 77c0918..79e7a82 100644 --- a/.envrc +++ b/.envrc @@ -1,16 +1,7 @@ -VIRTUAL_ENV=".venv" - PATH_add tools -# create venv -# HACK: use system python3.12, rather than bazel-provided Python -# bazel run --ui_event_filters=-INFO --noshow_progress --show_result=0 python3 -layout python python3.12 - -# install pip-tools if it's not already installed -if ! python -m piptools > /dev/null 2>&1; then - python -m pip install --quiet pip-tools -fi - -# pip-sync -python -m piptools sync --quiet py_requirements_lock.txt +# HACK: use uv-provided Python, rather than bazel-provided Python +# bazel-provided Python is: bazel run --ui_event_filters=-INFO --noshow_progress --show_result=0 python3 +uv venv --python 3.12 --quiet +uv pip sync --require-hashes --verify-hashes --strict --quiet py_requirements_lock.txt +source .venv/bin/activate