diff --git a/Makefile b/Makefile index 59cdae8f9fa..320e77cba27 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ # This makefile does nothing but delegating the actual building to cmake. +PYTHON = python3 all: - @mkdir -p build && cd build && cmake .. $(shell python ./scripts/get_python_cmake_flags.py) && $(MAKE) + @mkdir -p build && cd build && cmake .. $(shell $(PYTHON) ./scripts/get_python_cmake_flags.py) && $(MAKE) local: @./scripts/build_local.sh @@ -32,11 +33,11 @@ generate-gha-workflows: $(MAKE) shellcheck-gha setup_lint: - python tools/actions_local_runner.py --file .github/workflows/lint.yml \ + $(PYTHON) tools/actions_local_runner.py --file .github/workflows/lint.yml \ --job 'flake8-py3' --step 'Install dependencies' --no-quiet - python tools/actions_local_runner.py --file .github/workflows/lint.yml \ + $(PYTHON) tools/actions_local_runner.py --file .github/workflows/lint.yml \ --job 'cmakelint' --step 'Install dependencies' --no-quiet - python tools/actions_local_runner.py --file .github/workflows/lint.yml \ + $(PYTHON) tools/actions_local_runner.py --file .github/workflows/lint.yml \ --job 'mypy' --step 'Install dependencies' --no-quiet @if [ "$$(uname)" = "Darwin" ]; then \ @@ -46,20 +47,20 @@ setup_lint: fi; \ brew install shellcheck; \ else \ - python tools/actions_local_runner.py --file .github/workflows/lint.yml \ + $(PYTHON) tools/actions_local_runner.py --file .github/workflows/lint.yml \ --job 'quick-checks' --step 'Install ShellCheck' --no-quiet; \ fi pip install jinja2 quick_checks: - @python tools/actions_local_runner.py \ + @$(PYTHON) tools/actions_local_runner.py \ --file .github/workflows/lint.yml \ --job 'quick-checks' \ --step 'Extract scripts from GitHub Actions workflows' # TODO: This is broken when 'git config submodule.recurse' is 'true' since the # lints will descend into third_party submodules - @python tools/actions_local_runner.py \ + @$(PYTHON) tools/actions_local_runner.py \ --file .github/workflows/lint.yml \ --job 'quick-checks' \ --step 'Ensure no trailing spaces' \ @@ -74,19 +75,19 @@ quick_checks: --step 'Ensure correct trailing newlines' flake8: - @python tools/actions_local_runner.py \ + @$(PYTHON) tools/actions_local_runner.py \ --file-filter '.py' \ $(CHANGED_ONLY) \ --job 'flake8-py3' mypy: - @python tools/actions_local_runner.py \ + @$(PYTHON) tools/actions_local_runner.py \ --file-filter '.py' \ $(CHANGED_ONLY) \ --job 'mypy' cmakelint: - @python tools/actions_local_runner.py \ + @$(PYTHON) tools/actions_local_runner.py \ --file .github/workflows/lint.yml \ --job 'cmakelint' \ --step 'Run cmakelint' @@ -96,7 +97,7 @@ clang_tidy: exit 1 toc: - @python tools/actions_local_runner.py \ + @$(PYTHON) tools/actions_local_runner.py \ --file .github/workflows/lint.yml \ --job 'toc' \ --step "Regenerate ToCs and check that they didn't change"