Expand description
Manage an applicationβs UV environment.
ModulesΒ§
- migration π
ConstantsΒ§
StaticsΒ§
- MINIMUM_
UV_ πLAUNCHER_ PYTHON - Python versions below this cannot execute UVβs Windows console-script
launchers. See
provision_with_pip. - MINIMUM_
UV_ πVERSION
FunctionsΒ§
- add_
commands π - add_
helps π - add_
prephase_ πcmds - discovered_
python_ πexecutable - Resolve the discovered Python command to a concrete interpreter path, so it can be handed to UV unambiguously.
- ensure_
uv_ πavailable - guard_
uv_ πmanifest - is_
installable_ πproject - Does UV install this project itself, or only its dependencies?
- needs_
pip_ πprovisioning - UV writes Windows console scripts as a trampoline with a zip archive
appended. The trampoline runs
python.exe <the .exe itself>and relies on the interpreter executing that archive. CPythonβs old Czipimport, used up to and including 3.7, rejects it and falls back to parsing the executable as source, so every console script in such an environment is unusable βpytest, andorigenitself. CPython 3.8 replacedzipimportwith the pure-Python implementation, which reads it correctly. - provision π
- Install the locked environment.
- provision_
with_ πpip - require_
python π - require_
uv π - run
- run_
pre_ πphase - run_
python π - run_uv π