Skip to main content

Module interpreter

Module interpreter 

Source
Expand description

Which Python the built-in python interpreter is, when [interpreters] doesn’t define it.

The local commands (standalone, dags check, dags test) look, first match winning: an active virtualenv ($VIRTUAL_ENV), a project venv (.venv, then venv, in the current directory and its parents), the python3 next to the schedr binary, then python3 on PATH; a pyenv shim found there is resolved once with pyenv which python3, in the user’s environment and directory, since tasks get a clean environment and run elsewhere. A configured python always wins. See archive/PROJECT.md, Configuration: built-in interpreter.

Structs§

Found
The interpreter found, and how.
Host
Where the process runs: what discovery looks at.
PyenvError
A pyenv shim that pyenv couldn’t resolve.

Enums§

How
How the interpreter was found.

Constants§

PROJECT_VENVS
The project venv directories looked for, in order.

Functions§

apply
Sets the built-in python interpreter, if [interpreters] doesn’t define it and the DAG interpreter is python, and records how it was found (Config::builtin_python). Another DAG interpreter needs no lookup. project as for discover: on for the local commands, off for a worker.
discover
Finds the Python for the built-in python interpreter.
pyenv_which
Runs pyenv which python3 in the user’s environment and directory.