Add --use-uv flag for faster venv creation using uv#409
Open
budaesandrei wants to merge 1 commit intoaws:mainfrom
Open
Add --use-uv flag for faster venv creation using uv#409budaesandrei wants to merge 1 commit intoaws:mainfrom
budaesandrei wants to merge 1 commit intoaws:mainfrom
Conversation
Added opt-in --use-uv flag to create_venvs.py that uses uv for venv creation and package installation instead of the stdlib venv + pip. When the flag is not provided, behavior is unchanged. Updated README with usage example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in
--use-uvflag tocreate_venvs.pythat uses uv instead of the stdlibvenv+pipfor significantly faster virtual environment creation and package installation.Changes
is_uv_available()helper to check ifuvis on PATH.uv_install()function that usesuv pip install --python <venv_python>for package installation.create_venv()to accept ause_uvparameter:True: usesuv venvfor venv creation anduv pip installfor all packages, skipping the pip upgrade step (not needed with uv).False(default): behavior is completely unchanged.--use-uvargparse flag with a clear error message if uv is not installed.Compatibility
create_venvs.py --target productionwithout--use-uv.uv venvproduces a standard venv structure (bin/activate,bin/python) so all downstream consumers (quality checks, linting, unit tests, build scripts, VS Code settings) work identically.Testing
Verified the following scenarios:
--use-uvwith uv installed — creates venv withuv venv, installs packages withuv pip install--use-uv— identical behavior to before--use-uvwithout uv installed — exits with clear error message--use-uvwith--recreate— properly deletes and recreates venv using uv--help— new flag appears in usage output