1818# When calling `uv` we explicitly specify the --python executable to use so that
1919# the packages are installed into the correct virtual environment.
2020# In testing, when this was not set, packages could end up in the pyenv's
21- # site-packages directory; it's possible an environemnt variable can control this.
21+ # site-packages directory; it's possible an environment variable can control this.
2222
2323
2424def install (package : str ):
@@ -31,6 +31,7 @@ def on_progress(line: str):
3131 def on_error (line : str ):
3232 log .error (f"uv: [error]\n { line .strip ()} " )
3333
34+ log .info (f"Installing { package } " )
3435 _wrap_command_with_callbacks (
3536 [get_uv_bin (), 'add' , '--python' , '.venv/bin/python' , package ],
3637 on_progress = on_progress ,
@@ -79,6 +80,7 @@ def on_progress(line: str):
7980 def on_error (line : str ):
8081 log .error (f"uv: [error]\n { line .strip ()} " )
8182
83+ log .info (f"Uninstalling { requirement .name } " )
8284 _wrap_command_with_callbacks (
8385 [get_uv_bin (), 'remove' , '--python' , '.venv/bin/python' , requirement .name ],
8486 on_progress = on_progress ,
@@ -97,6 +99,7 @@ def on_progress(line: str):
9799 def on_error (line : str ):
98100 log .error (f"uv: [error]\n { line .strip ()} " )
99101
102+ log .info (f"Upgrading { package } " )
100103 _wrap_command_with_callbacks (
101104 [get_uv_bin (), 'pip' , 'install' , '-U' , '--python' , '.venv/bin/python' , package ],
102105 on_progress = on_progress ,
@@ -105,7 +108,7 @@ def on_error(line: str):
105108
106109
107110def create_venv (python_version : str = DEFAULT_PYTHON_VERSION ):
108- """Intialize a virtual environment in the project directory of one does not exist."""
111+ """Initialize a virtual environment in the project directory of one does not exist."""
109112 if os .path .exists (conf .PATH / VENV_DIR_NAME ):
110113 return # venv already exists
111114
0 commit comments