fix: make Makefile use $(PYTHON) instead of hardcoded python for python3-only systems#714
Merged
Merged
Conversation
…on3-only systems Systems with only `python3` on PATH (no `python`) cannot run `make ci` or any other target. Add a `PYTHON ?= python3` variable and replace all 67 bare `python` command invocations with `$(PYTHON)` so the Makefile works out of the box on modern environments. Also add a note in CONTRIBUTING.md documenting the override. Closes dgenio#712.
dgenio
approved these changes
Jun 19, 2026
dgenio
left a comment
Owner
There was a problem hiding this comment.
Reviewed — APPROVE. Clean, complete fix for #712. Verified via make -n: the default resolves to python3, make … PYTHON=python3.11 overrides correctly, and the override propagates into the example→architectures sub-make. CI is unaffected (setup-python provides both python and python3).
Confirmed the replacement is complete — zero bare python invocations remain in the full file (checked against the head, not just the diff), and all 67 are now $(PYTHON).
Two non-blocking notes:
CONTRIBUTING.md'spip install -e ".[dev]"bootstrap line still assumespipon PATH (#712 mentioned thepipassumption). It's outside the Makefile-interpreter scope and usually satisfied by an active venv — flagging only for completeness.ruff/mypy/mkdocsare left as bare console scripts rather than$(PYTHON) -m …. That's the correct choice (not all of them supportpython -m); no change needed.
Acceptance criteria from #712 all met and behaviorally verified. Nice, well-scoped change.
Generated by Claude Code
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.
Summary
Makefiletargets hardcodepythonon PATH, but many modern environments shiponly
python3. On those machines no documented commands —make test,make ci,make demo— run at all. This issue makes the interpreterconfigurable (
PYTHON ?= python3) so the documented workflow works out of thebox.
Changes
MakefilePYTHON ?= python3, replaced all 67pythonwith$(PYTHON)CONTRIBUTING.mdPYTHON=overrideVerification
grep -cP '^\\s+python\\b' Makefile→0(zero rawpythonon command lines)grep -cP '^\\s+\$\(PYTHON\)' Makefile→67(all replaced)setup-pythonwhich providespython)Closes
Closes #712