nvda
3616aef5 - use uv as venv/dependency orchestrator (#17978)

Commit
1 year ago
use uv as venv/dependency orchestrator (#17978) closes #17935 Summary of the issue: We're currently handling the NVDA virtual environment with custom scripts. Furthermore, we use requirements.txt as our only locking mechanism. Description of user facing changes For developers, blazing fast venv generation and venv spinning up and down. Also much more ease when dependencies are updated or added. On github actions, build times are improved by around two minutes when there is a cache for uv.lock. improvement of add-on development workflow when uv is used there as well. When uv is adopted, I will propose an update for the add-on template. Description of development approach Installed uv Adapted pyproject.toml to contain everything from requirements.txt in several dependency groups removed venvutils as no longer needed. Just use uv run Adapted the several batch scripts to use uv run Adapted sconstruct and nvda.pyw to ensure that an uv managed venv is used and that it is the environment belonging to the project. Adapted the github workflow to use the uv setup action. Might want to pin this to a particular version created ensureunv.bat that is currently used inside scons.bat to provide a simple uv installation experience. It offers to install uv using winget (recommended IMO) and using the official install script. The latter stores uf in %userprofile%/.local/bin removed sourceEnv module as this workaround is no longer necessary now miscDeps is a workspace member
Author
Parents
Loading