mamba-org / boa

The fast conda package builder, based on mamba
https://boa-build.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
255 stars 56 forks source link

Output files section? #251

Open hmaarrfk opened 2 years ago

hmaarrfk commented 2 years ago

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?

https://github.com/conda/conda-build/issues/3089

wolfv commented 2 years ago

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

hmaarrfk commented 2 years ago

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

hmaarrfk commented 2 years ago

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.