mamba-org/boa

Output files section?

Opened this issue · 3 comments

Do you support the output files section?

One of my favorite thing about packaging rpm files was that I could:

  1. Create a single rpm spec file (similar to the meta.yaml).
  2. Assign little files, like binaries, and headers to be part of specific sub packages (bin or dev)
  3. Assume all the rest of the files would be caught by the "standard file"

When doing that with conda, you have to explicitly list all the files. This somewhat makes things hard to maintain.

I asked conda-build a while back if they would consider raising an error, or having a catch all, I think it was considered out of scope.

I'm wondering if you think this is in scope for boa.

Does boa handle the "files" section?

conda/conda-build#3089

wolfv commented

Hey, it sounds like a good idea! Can you make a draft on how you'd express this in YAML?

I would really follow the existing syntax with a few checks:

https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#specifying-files-to-include-in-output

  1. A top level flag on ensuring that all files are "included" in a package.
  2. An extra flag that allows you to "get the remaining files". If two subpackages include this flag, an error should should be raised???

It may look something like this.

name: mypackage

build:
  ignore_files_missing_from_outputs: false   # A flag to tell boa to ignore files that are missing from output packages.

outputs:
   - name: mypackage-bin
     files:
        - bin/*
    # include_remaining_files: false   # implicitely false
  - name: mypackage-devel
    files:
      - include/*
    include_remaining_files: false   # you can make it explicit
  - name: mypackage
    include_remaining_files: true

the build system would raise an error

I remember isuruf had a PR somewhere that was similar is spirit to this. That said, I can't seem to find it. Did anybody ever work on this. I know I never had the time.