sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.4k stars 473 forks source link

document `executable=` in `sage.features.Executable`, improve API and implementation #38173

Open dimpase opened 4 months ago

dimpase commented 4 months ago

as discussed in https://groups.google.com/g/sage-release/c/Y8AsReUJrNw/m/n91Uywg0BQAJ

Expected Behavior

docs should be present

Actual Behavior

no docs present

Environment

all platforms

There are now more cases where Feature may have different executables, depending on platform of version. One such feature is ECM (ecm vs gmp-ecm), another, just found, ImageMagick (convert vs magick, see #38135). It would be good to have a meaningful API for this, not dependent on a global variable (the way ECM case is done now).

This of course means that some sort of initialisation has to be done - during which absolute file name etc, can well be cached, so that there is not search through PATH etc every time this is invoked.

Checklist

mkoeppe commented 4 months ago

+1 on extending the executable parameter to be an iterable of strings, not just a string, for such uses - executable=['ecm', 'gmp-ecm']. PR please

The question of configuration, right now done on a case-by-case basis using configuration variables, is separate