Configuration#
Configuration classes for controlling build behavior and platform settings.
You can import the configuration classes from rattler_build:
ToolConfiguration#
Configuration for the rattler-build tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
keep_build
|
bool
|
Whether to keep the build directory after the build is done |
False
|
compression_threads
|
int | None
|
Number of threads to use for compression (default: None - auto) |
None
|
io_concurrency_limit
|
int | None
|
Maximum number of concurrent I/O operations (default: None) |
None
|
test_strategy
|
Literal['skip', 'native', 'tests']
|
Test strategy to use ("skip", "native", or "tests") (default: "skip") |
'skip'
|
skip_existing
|
Literal['none', 'local', 'all']
|
Whether to skip packages that already exist ("none", "local", or "all") (default: "none") |
'none'
|
continue_on_failure
|
bool
|
Whether to continue building other recipes even if one fails (default: False) |
False
|
noarch_build_platform
|
str | None
|
Platform to use for noarch builds (default: None) |
None
|
channel_priority
|
Literal['strict', 'disabled']
|
Channel priority for solving ("strict" or "disabled") (default: "strict") |
'strict'
|
allow_insecure_host
|
list[str] | None
|
List of hosts for which SSL certificate verification should be skipped |
None
|
error_prefix_in_binary
|
bool
|
Whether to error if the host prefix is detected in binary files (default: False) |
False
|
allow_symlinks_on_windows
|
bool
|
Whether to allow symlinks in packages on Windows (default: False) |
False
|
use_zstd
|
bool
|
Whether to use zstd compression when downloading repodata (default: True) |
True
|
use_bz2
|
bool
|
Whether to use bzip2 compression when downloading repodata (default: True) |
True
|
use_sharded
|
bool
|
Whether to use sharded repodata when downloading (default: True) |
True
|
Example
allow_insecure_host
property
#
List of hosts for which SSL certificate verification should be skipped.
error_prefix_in_binary
property
#
Whether to error if the host prefix is detected in binary files.
allow_symlinks_on_windows
property
#
Whether to allow symlinks in packages on Windows.
__init__ #
__init__(
*,
keep_build=False,
compression_threads=None,
io_concurrency_limit=None,
test_strategy="skip",
skip_existing="none",
continue_on_failure=False,
noarch_build_platform=None,
channel_priority="strict",
allow_insecure_host=None,
error_prefix_in_binary=False,
allow_symlinks_on_windows=False,
use_zstd=True,
use_bz2=True,
use_sharded=True,
)
Create a new tool configuration.
PlatformConfig#
Platform configuration for building packages.
This class provides platform settings that are shared across different configuration objects (JinjaConfig, RenderConfig).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_platform
|
str | None
|
Target platform (e.g., "linux-64", "osx-arm64"). If not specified, defaults to the current platform. |
None
|
build_platform
|
str | None
|
Build platform (where the build runs). If not specified, defaults to the target platform. |
None
|
host_platform
|
str | None
|
Host platform (for cross-compilation). If not specified, defaults to the target platform. |
None
|
experimental
|
bool
|
Enable experimental features |
False
|
Example
# Create with default (current) platform
config = PlatformConfig()
# Create for a specific platform (build and host will default to target)
config = PlatformConfig(target_platform="linux-64")
# Create with different platforms for cross-compilation
config = PlatformConfig(
target_platform="osx-arm64",
build_platform="linux-64",
host_platform="osx-arm64"
)
JinjaConfig#
Python wrapper for PyJinjaConfig to provide a cleaner interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
platform
|
PlatformConfig | None
|
Platform configuration (target, build, host platforms, experimental flag) |
None
|
allow_undefined
|
bool | None
|
Whether to allow undefined variables in Jinja templates |
None
|
variant
|
dict[str, Any] | None
|
Variant configuration dictionary |
None
|
recipe_path
|
str | Path | None
|
Path to the recipe file (for relative path resolution in Jinja functions) |
None
|