rattler-build

repository·main·Indexed 18 days ago

https://github.com/prefix-dev/rattler-build

A fast, standalone conda-package builder written in Rust that creates cross-platform relocatable binaries from YAML recipes without requiring Python or conda-build. It includes a suite of crates for recipe rendering, source fetching, package archiving in .tar.bz2 and .conda formats, and automatic recipe generation for PyPI, CRAN, CPAN, and LuaRocks.

Tokens
169.1K
Snippets
582
Records
782
Agent score
59%

What's inside rattler-build

  1. Overview of rattler_build_core

    main

    rattler_build_core is the central engine of the rattler-build ecosystem. It provides the fundamental capabilities required to build conda packages, including:

    • Recipe Rendering: Processing recipe files into actionable build instructions.
    • Source Fetching: Retrieving source code from remote locations.
    • Script Execution: Running build and test scripts.
    • Package Building: Compiling and assembling the final package artifacts.
    • Testing: Verifying package integrity and functionality.
    • Publishing: Uploading built packages to repositories.
  2. Overview of rattler_build_script

    main
    The rattler_build_script crate provides the infrastructure for script execution and sandbox configuration within the rattler-build ecosystem. It allows for defining, parsing, and executing build scripts using various interpreters, including bash, cmd, python, and others. This is a core component used to manage the execution environment during the package building process.
  3. Overview of rattler_build_variant_config

    main
    The rattler_build_variant_config crate is the variant configuration system for rattler-build. It is responsible for managing build matrices, handling zip keys, and loading variant configuration files. This allows rattler-build to support complex build scenarios by defining how different package variants (like different Python versions or C++ standard libraries) interact and combine.
  4. Explore the Rattler-Build Python API core components

    main

    The rattler_build Python API is organized into several functional areas:

    • Recipe Management: Use the Recipe module to parse and work with conda recipes (supporting Stage0Recipe and Stage1Recipe).
    • Recipe Rendering: Use the Rendering module to render recipes with specific variants using RenderedVariant and VariantConfig.
    • Package Inspection: Use the Package module to inspect built packages and run tests via Package and PackageTest.
    • Build Results: Use the BuildResult module to access information about build outputs.
  5. Use rattler_build_package to create conda packages

    main

    The rattler_build_package crate is a library designed for creating conda packages in both .tar.bz2 and .conda formats. It can be used to build packages from existing recipe structures or by manually constructing metadata.

    Key capabilities include:

    • File Management: Collecting and filtering files for the package.
    • Metadata Generation: Automatically generating required conda metadata files such as about.json, index.json, and paths.json.
    • Prefix Handling: Detecting and managing prefix placeholders.
    • Transformations: Performing file transformations like handling noarch: python packages or creating symlinks.
    • Archiving: Creating the final compressed package archives in .tar.bz2 or .conda formats.