rattler-build
rattler-build copied to clipboard
patches with if cause problems
source:
- if: polars_variant == 'polars'
then:
url: https://pypi.org/packages/source/p/polars/${{ polars_variant | replace('-', '_') }}-${{ version }}.tar.gz
sha256: 5a3dac3cb7cbe174d1fa898cba9afbede0c08e8728feeeab515554d762127019
patches:
if: target_platform == 'win-64'
then: 0001-Patch-libz-ng-sys.patch
- if: polars_variant == 'polars-lts-cpu'
then:
url: https://pypi.org/packages/source/p/${{ polars_variant }}/${{ polars_variant | replace('-', '_') }}-${{ version }}.tar.gz
sha256: d2717d17cd764223ea01e35ada2e3235327bc08040ecd41c71c803c7aad874fb
patches:
if: target_platform == 'win-64'
then: 0001-Patch-libz-ng-sys.patch
- if: polars_variant == 'polars-u64-idx'
then:
url: https://pypi.org/packages/source/p/${{ polars_variant }}/${{ polars_variant | replace('-', '_') }}-${{ version }}.tar.gz
sha256: 5b47e993d3a73e40f674bc856dbac0e93eaf26c10bc7b1d6768f71faa6e023fe
patches:
if: target_platform == 'win-64'
then: 0001-Patch-libz-ng-sys.patch
context:
polars_variant: polars
version: '1.17.1'
package:
name: ${{ polars_variant }}
version: ${{ version }}
❯ rattler-build build -r .
Error:
× Failed to parse recipe
Error:
× Parsing: an unspecified error occurred.
╭─[7:11]
6 │ patches:
7 │ ╭─▶ if: target_platform == 'win-64'
8 │ ├─▶ then: 0001-Patch-libz-ng-sys.patch
· ╰──── expected scalar or sequence for patches
9 │ - if: polars_variant == 'polars-lts-cpu'
╰────
the yml schema doesn't complain so this is either an issue in rattler-build or in the schema.
Can you make it a list and try again?
yes making it a list fixes it. the yaml-schema doesn't complain, though.
For me, this is a schema issue as the patches should be a list of strings. @zelosleone you can take a look at this in the https://github.com/prefix-dev/recipe-format
Schema was updated :)