Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.python.runtime

Getting the embedded CPython onto THIS machine.

The interpreter is a DIRECTORY — a cdylib plus the vendored standard library beside it, tens of megabytes — so it is neither a maven dependency nor a resource inside a jar. A native distribution stages it beside the binary and the wrapper points VIS_PYTHON_NATIVE_PATH at it; everywhere else (a source checkout, a gateway running from clojure -M:vis) it is fetched ONCE from the runtime's own GitHub release into ~/.vis/python/runtime/<version>/<platform>/ and named through runtime/use-library!, because a JVM cannot set its own environment.

Resolution that already answers is never disturbed: an environment variable, a staged distribution and a built checkout all win over the network. The archive is unpacked into a sibling directory and MOVED into place, so a second process sees a complete installation or none — never a half-written standard library — and tar does the unpacking because the tree carries symlinks and execute bits that no jar or zip round-trips.

Getting the embedded CPython onto THIS machine.

The interpreter is a DIRECTORY — a cdylib plus the vendored standard library
beside it, tens of megabytes — so it is neither a maven dependency nor a
resource inside a jar. A native distribution stages it beside the binary and
the wrapper points `VIS_PYTHON_NATIVE_PATH` at it; everywhere else (a source
checkout, a gateway running from `clojure -M:vis`) it is fetched ONCE from the
runtime's own GitHub release into `~/.vis/python/runtime/<version>/<platform>/`
and named through `runtime/use-library!`, because a JVM cannot set its own
environment.

Resolution that already answers is never disturbed: an environment variable,
a staged distribution and a built checkout all win over the network. The
archive is unpacked into a sibling directory and MOVED into place, so a second
process sees a complete installation or none — never a half-written standard
library — and `tar` does the unpacking because the tree carries symlinks and
execute bits that no jar or zip round-trips.
raw docstring

archive-urlclj

(archive-url version platform)

The release asset for one version and platform tag.

The release asset for one version and platform tag.
sourceraw docstring

ensure-library!clj

(ensure-library!)

Make the interpreter for this platform resolvable, answering the library path.

A no-op when the runtime already resolves one. Otherwise the cached installation is used, or the platform archive is fetched into it first. Every caller of the interpreter goes through env-python/ensure-interpreter!, which calls this before starting it.

Make the interpreter for this platform resolvable, answering the library path.

A no-op when the runtime already resolves one. Otherwise the cached
installation is used, or the platform archive is fetched into it first. Every
caller of the interpreter goes through `env-python/ensure-interpreter!`, which
calls this before starting it.
sourceraw docstring

ensure-project!clj

(ensure-project! project)

Prepare an extension with bundled uv and the worker's embedded Python. An offline check reuses a ready environment without resolution or installation; otherwise uv owns lock updates, dependency groups and its package cache.

Prepare an extension with bundled uv and the worker's embedded Python.
An offline check reuses a ready environment without resolution or installation;
otherwise uv owns lock updates, dependency groups and its package cache.
sourceraw docstring

installer-errorclj

(installer-error installer phase {:keys [exit timeout? diagnostics out]})

A safe installation failure for CLI/UI boundaries. Keep only the verdict and a bounded, redacted diagnostic tail, never a raw command or exception cause.

A safe installation failure for CLI/UI boundaries. Keep only the verdict and
a bounded, redacted diagnostic tail, never a raw command or exception cause.
sourceraw docstring

pip-install!clj

(pip-install! specs)
(pip-install! opts specs)

Install specs with pip and make what landed importable in THIS process, answering pip's own {:exit … :out … :command …}. python.index_url from the merged vis.yml overrides pip's primary index; when absent, pip's inherited environment and configuration remain unchanged.

pip runs as a host process writing into a directory this interpreter already has on sys.path, and a path entry remembers the listing it saw when it was first read. Without the invalidation the install succeeds and the very next import still raises ModuleNotFoundError — for the life of the process. Measured on a machine that had never installed pytest.

Install `specs` with pip and make what landed importable in THIS process,
answering pip's own `{:exit … :out … :command …}`.
`python.index_url` from the merged vis.yml overrides pip's primary index;
when absent, pip's inherited environment and configuration remain unchanged.

pip runs as a host process writing into a directory this interpreter already
has on `sys.path`, and a path entry remembers the listing it saw when it was
first read. Without the invalidation the install succeeds and the very next
import still raises `ModuleNotFoundError` — for the life of the process.
Measured on a machine that had never installed pytest.
sourceraw docstring

preparation-statusclj

(preparation-status)

Public, credential-free preparation stages keyed by package display name.

Public, credential-free preparation stages keyed by package display name.
sourceraw docstring

prepared-projectclj

(prepared-project project)

Validate a manually prepared environment with uv sync --check; never install.

Validate a manually prepared environment with uv sync --check; never install.
sourceraw docstring

uv-command!clj

(uv-command! args)

Run bundled upstream uv with unchanged arguments and stdio; return its exit code. Vis's python.index_url supplies UV_DEFAULT_INDEX unless uv's index environment is already set. Explicit uv CLI options retain upstream precedence.

Run bundled upstream uv with unchanged arguments and stdio; return its exit code.
Vis's python.index_url supplies UV_DEFAULT_INDEX unless uv's index environment
is already set. Explicit uv CLI options retain upstream precedence.
sourceraw docstring

version-globalsclj

(version-globals)

Host-owned build metadata shared by Python namespaces and the model prompt. The bundled SDK is versioned with Vis, never with an editable or pip package. Source builds report dev; an unavailable commit is nil, not a guessed release.

Host-owned build metadata shared by Python namespaces and the model prompt.
The bundled SDK is versioned with Vis, never with an editable or pip package.
Source builds report dev; an unavailable commit is nil, not a guessed release.
sourceraw docstring

version-globals-pythonclj

(version-globals-python)

Python bootstrap statement for the host's build metadata, encoded as JSON.

Python bootstrap statement for the host's build metadata, encoded as JSON.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close