uv build
Build an expression inside a uv-managed isolated environment.
Mirrors xorq build, but runs inside a uv-managed environment seeded from the script’s pyproject.toml (or PEP 723 inline metadata), so the build records dependency-faithful requirements.
Usage
xorq uv build SCRIPT_PATH [OPTIONS]Arguments
SCRIPT_PATH—Path to the Python script that defines the expression.
Options
| Option | Default | Description |
|---|---|---|
-e, --expr-name |
expr |
Name of the expression variable in the Python script. |
--builds-dir |
builds |
Directory for all generated artifacts. |
--cache-dir |
$XORQ_CACHE_DIR or ~/.cache/xorq |
Directory for parquet cache files. |
--project-path |
search upward from the script for pyproject.toml | Explicit project root. |
--pep723 |
off | Use PEP 723 inline metadata from the script instead of a project’s pyproject.toml. |
--extra |
none | Optional dependency group to include in requirements (repeatable). |
--all-extras / --no-all-extras |
--all-extras |
Include all optional dependency groups. |
--debug |
off | Output SQL files and other debug artifacts. |
--emit-build-path-to |
none | Write the resulting build directory path to this file. Use when stdout may be polluted (for example by OTel console fallback) and a subprocess consumer needs the path unambiguously. |
Examples
# Build with an auto-discovered project root and all extras
xorq uv build pipeline.py -e expr --builds-dir builds
# Build pinning a specific project root
xorq uv build pipeline.py --project-path ./pipeline-project
# Include only specific extras (disables --all-extras)
xorq uv build pipeline.py --no-all-extras --extra ml --extra postgres