I’ve been chatting with @matterhorn103 about using pixi
(Getting Started - Pixi by prefix.dev) for plugin management. The bonus as discussed in a previous thread is that pixi handles both PyPI and conda-forge
packages.
Here’s a rough draft of what I’d like to do:
- include
pixi
in the Windows and Mac build “bundles” (presumably also with AppImage and Flatpak) - on launch if
pixi
isn’t installed (e.g., Linux, FreeBSD, etc.) ask the user if they’d like to download it- I’m not super happy with the default mechanism to install
pixi
since it involves running a script directly from a website – seems very insecure vs. downloading from GitHub
- I’m not super happy with the default mechanism to install
- if a plugin (e.g.,
xtb
) includes apyproject.toml
with appropriate sections, ask the user if they wish to runpixi install
to install all dependencies
This means that Avogadro will need to track if a plugin is run via pixi
- but this will support future efforts for non-Python plugins (e.g., pixi run …
)
I would like to also offer:
- if
python
is not found, ask the user if they wish topixi global install python
(e.g., for the input generators - this also offers the potential for a basic “avogadro environment” including the
avogadro
andopenchemistry
Python modules (and maybecclib
as well)
I think on Mac and Windows, this would be a clear win, since we can reliably install Python in a place we can find. It makes it much easier for simple scripts / plugins like the generators, etc. or a script console in Avogadro itself.
Thoughts? Complaints? Better ideas?