Skip to content

rattler-build build#

Build a package from a recipe

Usage#

rattler-build build [OPTIONS]

Options#

  • --recipe (-r) <RECIPES>
    The recipe file or directory containing recipe.yaml. Defaults to the current directory
    May be provided more than once.
    default: .
  • --recipe-dir <RECIPE_DIR>
    The directory that contains recipes
  • --up-to <UP_TO>
    Build only the specified package and outputs needed to build it. Runtime and explicit test dependencies are also included unless tests are skipped
  • --build-platform <BUILD_PLATFORM>
    The build platform to use for the build (e.g. for building with emulation, or rendering)
  • --target-platform <TARGET_PLATFORM>
    The target platform for the build
  • --host-platform <HOST_PLATFORM>
    The host platform for the build. If set, it will be used to determine also the target_platform (as long as it is not noarch)
  • --channel (-c) <CHANNELS>
    Add a channel to search for dependencies in
    May be provided more than once.
  • --variant-config (-m) <VARIANT_CONFIG>
    Variant configuration files for the build
    May be provided more than once.
  • --variant <VARIANT_OVERRIDES>
    Override specific variant values (e.g. --variant python=3.12 or --variant python=3.12,3.11). Multiple values separated by commas will create multiple build variants
    May be provided more than once.
  • --ignore-recipe-variants
    Do not read the variants.yaml file next to a recipe
  • --render-only
    Render the recipe files without executing the build
  • --with-solve
    Render the recipe files with solving dependencies
  • --keep-build
    Keep intermediate build artifacts after the build
  • --no-build-id
    Don't use build id(timestamp) when creating build directory name
  • --compression-threads <COMPRESSION_THREADS>
    The number of threads to use for compression (only relevant when also using --package-format conda)
  • --io-concurrency-limit <IO_CONCURRENCY_LIMIT>
    The maximum number of concurrent I/O operations to use when installing packages This can be controlled by the RATTLER_IO_CONCURRENCY_LIMIT environment variable Defaults to 8 times the number of CPUs
    env: RATTLER_IO_CONCURRENCY_LIMIT
  • --experimental
    Enable experimental features
    env: RATTLER_BUILD_EXPERIMENTAL
  • --v3
    Enable V3 recipe fields and MatchSpec syntax
  • --allow-insecure-host <ALLOW_INSECURE_HOST>
    List of hosts for which SSL certificate verification should be skipped
    May be provided more than once.
  • --channel-priority <CHANNEL_PRIORITY>
    Channel priority to use when solving
  • --extra-meta <EXTRA_META>
    Extra metadata to include in about.json
    May be provided more than once.
  • --continue-on-failure=<MODE>
    Continue building even if (one) of the packages fails to build. This is useful when building many packages with --recipe-dir. With =skip-dependents, also skip every package that needs a package whose build failed in this run (as a build or host dependency, or through their run dependencies), instead of building it later against the configured channels
    options: yes, skip-dependents
  • --parallel-builds <BUILDS[:JOBS]>
    Build up to BUILDS outputs at the same time, as soon as their dependencies are available (default: 1). With :JOBS, the builds also share a GNU make jobserver with JOBS job slots (unix only), honoured by make >= 4.4 and ninja >= 1.13 when the build does not pass its own -j; CPU_COUNT is then set to JOBS / BUILDS unless already set

Modifying result#

  • --build-num <BUILD_NUM>
    Override the build number for all outputs (defaults to the build number in the recipe)
  • --build-string-prefix <BUILD_STRING_PREFIX>
    Prefix to prepend to the auto-generated build string (e.g. --build-string-prefix my_prefix produces my_prefix_h1234_0)
  • --package-format <PACKAGE_FORMAT>
    The package format to use for the build. Can be one of tar-bz2 or conda. You can also add a compression level to the package format, e.g. tar-bz2:<number> (from 1 to 9) or conda:<number> (from -7 to 22).
  • --no-include-recipe
    Don't store the recipe in the final package
  • --test <TEST>
    The strategy to use for running tests
    options: skip, native, native-and-emulated
  • --color-build-log
    Don't force colors in the output of the build script
    default: true
  • --env-isolation <ENV_ISOLATION>
    Environment isolation mode for build scripts. strict (default): clean environment with normalized locale, HOME, USER etc. conda-build: match conda-build behavior (forward CFLAGS, LDFLAGS, LANG, HOME etc.) none: inherit the entire host environment
    default: strict
  • --output-dir <OUTPUT_DIR>
    Output directory for build artifacts.
    env: CONDA_BLD_PATH
  • --skip-existing <SKIP_EXISTING>
    Whether to skip packages that already exist in any channel If set to none, do not skip any packages, default when not specified. If set to local, only skip packages that already exist locally, default when using --skip-existing. If set toall, skip packages that already exist in any channel <br>**options**:none,local,all`
  • --noarch-build-platform <NOARCH_BUILD_PLATFORM>
    Define a "noarch platform" for which the noarch packages will be built for. The noarch builds will be skipped on the other platforms
  • --markdown-summary <MARKDOWN_SUMMARY>
    Write a markdown summary to the specified file (appends to the file). Useful for generating PR comments or custom reports
  • --error-prefix-in-binary
    Error if the host prefix is detected in any binary files
  • --allow-symlinks-on-windows
    Allow symlinks in packages on Windows (defaults to false - symlinks are forbidden on Windows)
  • --error-overlapping-files
    Error instead of warn when outputs of one recipe package the same file
  • --error-unused-staging-files
    Error instead of warn when files from a staging cache are not included in any output that inherits from it
  • --exclude-newer <EXCLUDE_NEWER>
    Exclude packages newer than this date from the solver, in RFC3339 format (e.g. 2024-03-15T12:00:00Z)

Sandbox arguments#