datalad / datalad-installer

Installation script for Datalad and related components
MIT License
6 stars 3 forks source link

miniconda: add --python-match=LEVEL option #113

Closed yarikoptic closed 2 years ago

yarikoptic commented 2 years ago

It was discovered in DataLad that we are actually not against the python version we thought we are testing on Travis CI. It is due to the fact that we install git-annex using miniconda --batch git-annex=8.20201007 -m conda install scenario, which installs default to miniconda python. Although it should be possible to install specific python version via --spec option (note discovered interactivity issue #112 ) it would make it hard and duplicative if not impossible (e.g. in global definition of _DL_ANNEX_INSTALL_SCENARIO here) to specify desired version of python, I thought it would be more sensible to just add an option to datalad-installer since it is a Python script after all. So, I think --python-match could take one of the values MAJOR, MINOR, or MICRO which would describe to which level of the version of python it should match. E.g. for 3.9.10 for MAJOR it would be just 3, MINOR - 3.9 and MICRO - 3.9.10. Then in our travis configuration for DataLad, we would likely to set it to MINOR.

jwodder commented 2 years ago

@yarikoptic To be clear: Passing --python-match=LEVEL to the miniconda component should cause python=X.Y.Z to be added to miniconda's spec, correct?

yarikoptic commented 2 years ago

Yes! (besides that X.Y.Z would vary depending on that LEVEL and could e.g. be just X.Y if LEVEL==MINOR)

yarikoptic commented 2 years ago

and unless there is any better way (may be miniconda installer takes python version as an option?) than adding it to the spec?

jwodder commented 2 years ago

@yarikoptic

may be miniconda installer takes python version as an option?

It does not.