easybuild-easyblocks icon indicating copy to clipboard operation
easybuild-easyblocks copied to clipboard

Fix handling of maximum python version in pick_python_cmd

Open Flamefire opened this issue 1 year ago • 0 comments

When the minor version is unset, only the major version must be checked. Otherwise patch versions etc. must be ignored. This allows: 3.7.4 for "max_py_majver=3" and "max_py_majver=3 max_py_minver=7"

However I'd argue that our current approach with max_py_maj/minver and req_py_maj/minver is error-prone anyway: It does not make sense to only specify a minor version for either. Hence I'd change that easyconfig parameter into a single one: required_python_version which is a string like "3.7", same for the max version.
This can then be converted to a LooseVersion and fully avoids the possibility of missing major versions as well as having only a single parameter instead of 2. We can convert the current parameters to the new one automatically and deprecate them for 5.1 or IMO better just remove them for 5.0 as currently ReFrame is the only EC using this and it is trivial to update.

  • [ ] Requires https://github.com/easybuilders/easybuild-easyblocks/pull/3432

Flamefire avatar Oct 11 '24 09:10 Flamefire