Open marcoesters opened 3 months ago
Looking more into the code, it looks like only one output is generated. However, the output only contains the information of the last installer that was created. So, I'm wondering if this should be changed to create one output per installer file or if the info.json
object needs to be improved to contain the information of all installers that were created.
I updated the initial post to reflect that.
Even if we have two installers generated, so far the info.json contents would have been the same (both installers bundle the same packages), but if we are going to add more output types, maybe we do need to disambiguate. I'd stick to something predictable like installer-version.ext.json
?
Most information is the same, but not all. I am playing with merging the information right now to something like this:
# Merge info files for each installer type
if len(itypes) > 1:
keys = set()
for info_dict in info_dicts:
keys.update(info_dict.keys())
for key in keys:
if any(info_dict.get(key) != info.get(key) for info_dict in info_dicts):
info[key] = [info_dict.get(key, "") for info_dict in info_dicts]
For now, this could be more feasible than creating two largely identical files.
Checklist
What happened?
The output files have generic names like
info.json
. When creating bothpkg
andsh
installers,constructor
does notdistinguish between the two when creating output files so thatoutput information on theinfo.json
is overwrittensh
installer.It is of course possible to just call them
info.sh.json
andinfo.pkg.json
, but I propose a different naming scheme:<installer name>_info.json
. While this will make file names longer, it makes file names unique and directly tied to the installer and simplifies the work of users: if multiple installers are built into one directory or uploaded to a GitHub release, the user will not have to do any sort of renaming to make sure files are not overwritten.An alternative is to output the information of both installer types into the
info.json
file.Conda Info
No response
Conda Config
No response
Conda list
Additional Context
No response