rapidsai / dependency-file-generator

https://pypi.org/project/rapids-dependency-file-generator/
Apache License 2.0
14 stars 12 forks source link

Support matrix entries for pyproject.toml #46

Closed vyasr closed 4 months ago

vyasr commented 1 year ago

Currently dfg explicitly prohibits matrix entries when generating pyproject.toml files. This partially makes sense: there can only ever be one pyproject.toml file at a time, so there is no value in being able to generate multiple files in one run (i.e. when dfg is run without arguments). However, there is a use case for being able to control the matrix entry used from the command line. One application of this is if we have different Python package requirements for different CUDA versions (e.g. cupy-cuda11x vs cupy-cuda12x). We would like for the packaging process to be able to leverage dfg to generate the appropriate dependency list before a package is built in this case. To support this we should allow specifying multiple matrix entries in the dependencies section even if one of the output_types is pyproject.toml. We should continue to prohibit a matrix entry in the files section, instead only generating by default the file corresponding to the default matrix entries. Note that this will require a fallback to be present for all dependency lists that specify pyproject as an output type and have a matrix section.

bdice commented 1 year ago

Another instance of this issue came up: https://github.com/rapidsai/rmm/pull/1223#discussion_r1235996234

vyasr commented 4 months ago

This was resolved in #70