use major/minor version of Python command being used if req_py_majver/req_py_minver are not specified#1907
Merged
ocaisa merged 1 commit intoeasybuilders:developfrom Jan 7, 2020
Conversation
…/req_py_minver are not specified
ocaisa
approved these changes
Jan 7, 2020
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important note: the part of the code being changed here is only relevant if
Pythonis not included as a dependency, so it only affects a very limited amount of easyconfigs for Python software (mostlyEasyBuilditself, but alsoPyYAMLeasyconfigs using thesystemtoolchain,ReFrame, etc.).The changes here fix the issue reported in easybuilders/easybuild-easyconfigs#9151, where installing an
EasyBuildeasyconfig (for example viaeb --install-latest-eb-release) fails in the sanity check, because the installation is performed using the systempythoncommand, while the sanity check paths are derived using the Python version that is used to run EasyBuild with (basically becauseSYS_PYTHON_VERSIONis used inallow_system_depsin theEasyBuildeasyconfigs).By specifying that the major/minor Python version of the Python being used by EasyBuild itself (via
sys.version_info) as requirement when picking thepythoncommand, the correctpythoncommand is picked, and things work out correctly...We're changing the default value for
req_py_majverandreq_py_minverhere, but that's OK to do imho since i) this doesn't affect easyconfigs which already set a different major/minor version (seeReFrameeasyconfigs for example), and ii) the current default of requiring Python 2.6 was sort of dodgy anyway (it worked well while EasyBuild only supported Python 2, but not anymore).This not only fixes the issue for
EasyBuildreported in easybuilders/easybuild-easyconfigs#9151, but also forPyYAML-3.13.ebfor example (when the systempythonis Python 2.7, but EasyBuild itself is being run with Python 3.x).