Skip to content

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Jul 18, 2025

This tests that conditional dependencies and extras (optional dependency groups) work in rattler-build.

The recipe that I tested with looks like this:

package:
  name: conditional
  version: 0.1.0

requirements:
  run:
    - rattler-build
    - bzip2 *; if rattler-build >=0.44
    - zstd *; if rattler-build <0.44

  extras:
    science:
      - numpy
      - matplotlib
    web:
      - flask
    cli:
      - click

tests:
  - script:
    - echo "Hello, world!"
    requirements:
      run:
        - rattler-build >=0.44
  - script:
    - echo "This is a test for Rattler < 0.44"
    requirements:
      run:
        - rattler-build <0.44
  - script:
    - echo "This is a test for Rattler < 0.44"
    requirements:
      run:
        - conditional [extras=[science, web]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant