Module env

Source
Expand description

Manage an application’s UV environment.

ModulesΒ§

migration πŸ”’

ConstantsΒ§

BASE_CMD

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 C zipimport, 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, and origen itself. CPython 3.8 replaced zipimport with 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 πŸ”’