Skip to content

ENH: make source.filter available also for URL sources #2581

Description

@h-vetinari

When building llvmdev, we want to remove all the subprojects that are not being built. For other subprojects, it would be nice to filter out third_party folders (either partially or entirely).

Based on the docs, it looks

source:
  path: /path/to/source
  filter:
    - list
    - of
    - globs

it looks like the API would already be there, but this is currently not implemented for URLs

 38 |     filter:
    :     ^^^|^^
    :        `-- invalid value for 'url source': unknown field 'filter'

What I want to do is something along the lines of

source:
  - url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version.replace(".rc", "-rc") }}.tar.gz
    sha256: ad18b70e287954c3d62bc7e0b86e7b7af2adf87bcfce21c15fe717f101d7aace
    filter:
      # we don't want to accidentally build more than clang here
      - cmake/*
      - clang/*
      - clang-tools-extra/*

resp.

source:
  url: https://github.com/pytorch/pytorch/releases/download/v${{ version }}/pytorch-v${{ version }}.tar.gz
  sha256: 757145cfd55c7c8c01f58c959f76230641cc67fdd1d8b6a130f93ad1bc116f5f
  filter:
    exclude:
      # ensure we use our own fmt
      - third_party/fmt/*

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions