diff --git a/dev/404.html b/dev/404.html index 697549fd..66fcea95 100644 --- a/dev/404.html +++ b/dev/404.html @@ -440,6 +440,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/assets/images/social/tutorials/perl.png b/dev/assets/images/social/tutorials/perl.png new file mode 100644 index 00000000..32df49ef Binary files /dev/null and b/dev/assets/images/social/tutorials/perl.png differ diff --git a/dev/authentication_and_upload/index.html b/dev/authentication_and_upload/index.html index d7454592..9f4f321c 100644 --- a/dev/authentication_and_upload/index.html +++ b/dev/authentication_and_upload/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/automatic_linting/index.html b/dev/automatic_linting/index.html index 24ec845e..6cf3af4f 100644 --- a/dev/automatic_linting/index.html +++ b/dev/automatic_linting/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/build_options/index.html b/dev/build_options/index.html index 84054c02..d60cb812 100644 --- a/dev/build_options/index.html +++ b/dev/build_options/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/build_script/index.html b/dev/build_script/index.html index 2928d49b..e5aea97c 100644 --- a/dev/build_script/index.html +++ b/dev/build_script/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/compilers/index.html b/dev/compilers/index.html index e37e9233..acc602cd 100644 --- a/dev/compilers/index.html +++ b/dev/compilers/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/converting_from_conda_build/index.html b/dev/converting_from_conda_build/index.html index 50740ebf..7b0831af 100644 --- a/dev/converting_from_conda_build/index.html +++ b/dev/converting_from_conda_build/index.html @@ -11,7 +11,7 @@ - + @@ -477,6 +477,27 @@ + + +
  • + + + + + Perl + + + + +
  • + + + + + + + + @@ -1552,9 +1573,9 @@

    Converting the test section diff --git a/dev/experimental_features/index.html b/dev/experimental_features/index.html index dced04c2..a6f09735 100644 --- a/dev/experimental_features/index.html +++ b/dev/experimental_features/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/highlevel/index.html b/dev/highlevel/index.html index 0565d5ea..3729c01f 100644 --- a/dev/highlevel/index.html +++ b/dev/highlevel/index.html @@ -544,6 +544,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/index.html b/dev/index.html index 7e97f19d..54bbffd5 100644 --- a/dev/index.html +++ b/dev/index.html @@ -614,6 +614,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/internals/index.html b/dev/internals/index.html index 688c9632..f01e6cf1 100644 --- a/dev/internals/index.html +++ b/dev/internals/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/multiple_output_cache/index.html b/dev/multiple_output_cache/index.html index 2f5222a2..cedfdca7 100644 --- a/dev/multiple_output_cache/index.html +++ b/dev/multiple_output_cache/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • @@ -729,9 +750,18 @@
  • - + - Caching in the $SRC_DIR + Source code in the cache + + + +
  • + +
  • + + + C++ Example that builds Python bindings on top of a library @@ -1250,9 +1280,18 @@
  • - + - Caching in the $SRC_DIR + Source code in the cache + + + +
  • + +
  • + + + C++ Example that builds Python bindings on top of a library @@ -1297,28 +1336,33 @@

    The cache for multiple outputs version: '0.1.0' cache: - requirements: - build: - - ${{ compiler('c') }} - build: - script: - - mkdir -p $PREFIX/lib - - mkdir -p $PREFIX/include - - echo "This is the library" > lib/library.txt - - echo "This is the header" > include/header.txt - -outputs: - - package: - name: mypackage-library - build: - files: - - lib/* - - - package: - name: mypackage-headers - build: - files: - - include/* + source: + - url: https://example.com/library.tar.gz + sha256: 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef + + requirements: + build: + - ${{ compiler('c') }} + + build: + script: + - mkdir -p $PREFIX/lib + - mkdir -p $PREFIX/include + - echo "This is the library" > lib/library.txt + - echo "This is the header" > include/header.txt + +outputs: + - package: + name: mypackage-library + build: + files: + - lib/* + + - package: + name: mypackage-headers + build: + files: + - include/*

    Note

    @@ -1330,13 +1374,76 @@

    The cache for multiple outputsthe build options documentation.

    -

    Run exports from the cache#

    +

    Run exports from the cache#

    Since the cache output also has build- and host requirements we need to additionally take care of eventual "run-exports" from the cache output. Run exports from the cache-dependencies are handled very similar to the run exports from a given output. We append any run exports to the outputs.

    If the cache has an "ignore run exports" section, than we apply those filters at the cache level. If the output ignores any run exports, then we also ignore the run-exports if they would come from the cache.

    -

    Caching in the $SRC_DIR#

    -

    If you used conda-build a lot, you might have noticed that a top-level build is also caching the changes in the $SRC_DIR. This is not the case for rattler-build yet.

    -

    You could try to work around by e.g. copying files into the $PREFIX and restoring them in each output.

    +

    Source code in the cache#

    +

    The cache output has its own source section. For every output, the (dirty) source is restored from the cache directory. Outputs can layer additional files on top of the cache source. +However, if you already ran cmake in the cache output, you can continue from where the build left off. This is useful when you want to e.g. build additional components (such as Python bindings) on top of the already-built library.

    +

    C++ Example that builds Python bindings on top of a library#

    +

    You can find an example (with source code) here: Link.

    +
    variants.yaml
    python:
    +  - "3.12.*"
    +  - "3.11.*"
    +
    +

    And the corresponding recipe:

    +
    recipe.yaml
    recipe:
    +name: calculator
    +version: 1.0.0
    +
    +cache:
    +source:
    +  path: ../
    +
    +requirements:
    +  build:
    +    - ${{ compiler('cxx') }}
    +    - cmake
    +    - ninja
    +build:
    +  script:
    +    # make sure that `alternative_name.md` is not present
    +    - test ! -f ./alternative_name.md
    +    - mkdir build
    +    - cd build
    +    - cmake $SRC_DIR -GNinja ${CMAKE_ARGS}
    +    - ninja install
    +
    +outputs:
    +# this first output will include all files installed during the cache build
    +- package:
    +    name: libcalculator
    +
    +  requirements:
    +    run_exports:
    +      - ${{ pin_subpackage('libcalculator') }}
    +# This output will build the Python bindings using CMake and then create new
    +# packages with the Python bindings
    +- package:
    +    name: py-calculator
    +  source:
    +    - path: ../README.md
    +      file_name: alternative_name.md
    +
    +  requirements:
    +    build:
    +      - ${{ compiler('cxx') }}
    +      - cmake
    +      - ninja
    +    host:
    +      - pybind11
    +      - python
    +      - libcalculator
    +
    +  build:
    +    script:
    +      # assert that the README.md file is present
    +      - test -f ./alternative_name.md
    +      - cd build
    +      - cmake $SRC_DIR -GNinja ${CMAKE_ARGS} -DBUILD_PYTHON_BINDINGS=ON
    +      - ninja install
    +
    diff --git a/dev/package_spec/index.html b/dev/package_spec/index.html index e99ed667..7b74fb22 100644 --- a/dev/package_spec/index.html +++ b/dev/package_spec/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/rebuild/index.html b/dev/rebuild/index.html index c95d15e6..4f278905 100644 --- a/dev/rebuild/index.html +++ b/dev/rebuild/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/recipe_generation/index.html b/dev/recipe_generation/index.html index 73707fe8..e57466bf 100644 --- a/dev/recipe_generation/index.html +++ b/dev/recipe_generation/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • diff --git a/dev/reference/cli/index.html b/dev/reference/cli/index.html index d0584063..f0a4eb4a 100644 --- a/dev/reference/cli/index.html +++ b/dev/reference/cli/index.html @@ -477,6 +477,27 @@ +
  • + + + + + Perl + + + + +
  • + + + + + + + + + +
  • @@ -1581,6 +1602,13 @@
    Options:Options:Modifying result#