Closed pgierz closed 3 years ago
Hi Paul, this is an issue we had with Lars, and we figured it out what was going on.
The problem is that ESM-Tools thinks esm-pism
is a ESM package, and not a plugging, and it is trying to get its version to print it into the esm_versions check output. I started to work on a fix for that but I could not finish it as other fixes were more urgent (and I am not familiar to the esm_version_checker
so I'm slow), but we made a provisional solution for Lars. A git diff
in the esm_version_checker
of Lars will show you the changes necessary for the provisional fix.
I see now this is not an issue but a pull request. This solution would also do :)
Another problem that is related to what @mandresm mentioned is that, we are getting the modules programmatically:
esm_tools_modules = [lib.key for lib in installed_packages if lib.key.startswith('esm-')]
clean tool does a similar thing, indeed in the previous version it removed a binary of mine that just contained the substring esm
inside it (because it was using globbing).
Therefore, my proposal is using a constant list of the esm_tools in the beginning of the code:
ALL_ESM_TOOLS = ('esm_tools', esm_master', ...)
to avoid any confusions. This will of course make the function get_esm_packages()
obsolete.
What do you guys think?
Another problem that is related to what @mandresm mentioned is that, we are getting the modules programmatically:
esm_tools_modules = [lib.key for lib in installed_packages if lib.key.startswith('esm-')]
clean tool does a similar thing, indeed in the previous version it removed a binary of mine that just contained the substring
esm
inside it (because it was using globbing). Therefore, my proposal is using a constant list of the esm_tools in the beginning of the code:ALL_ESM_TOOLS = ('esm_tools', esm_master', ...)
to avoid any confusions. This will of course make the functionget_esm_packages()
obsolete.What do you guys think?
I think this is a nice solution too, the problem is that these packages might change over time forcing us to have to maintain another line. What I was trying to do when trying to fix this issue for Lars was to actually look at the procedence of the esm-
packages and if they would come from github.com/esm-tools
then consider them as esm_tools packages. The problem is that finding out where packages come from is not particularly easy (or at least I didn't find a clean way of doing it without having to check git for editable installed packages and looking inside the metadata.json in the egg of the default installed packages).
Circumvents the weird bug: