Fallback on PYTHON path in Makefile #13896
Merged
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.
SUMMARY
If I understand correctly, this change should make '$(PYTHON)' work how we want it to everywhere. Before this change, on develpers' machines that don't have a 'python3.9' in their path, make would fail. With this change, we will prefer python3.9 if it's available, but we'll take python3 or python otherwise.
I think setting this might be an artifact from having several minor versions of Python 3 available. It may not even still be relevant. Let me know if I'm misunderstanding this or if there's somewhere where this will fail. My main goal is to avoid
make
failing because a developer does not have a bin namedpython3.9
in their path (or the equiv symlink or w/e). Like, maybe I havepython3
andpython3.11
and then I have to setPYTHON
myself for runningmake
. I think we can find something that works for these cases.I really think this does what we mean for all cases: make from dev machine, make from container, make from scripts. It will even run the venv path one if started from venv.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION