diff --git a/Makefile b/Makefile index 37588395eeb480..9985b7fd3dfcc1 100644 --- a/Makefile +++ b/Makefile @@ -1410,19 +1410,16 @@ endif .PHONY: lint-yaml-build # python -m pip install yamllint # Try with '--system' if it fails without; the system may have set '--user' -# Jenkins CI lint job uses python2 for linting. When Node.js 12.x is EOL, we -# can remove that from the Jenkins job config and $(PYTHON) for YAML linting -# just like everywhere else. (yamllint does not support Python 2.) lint-yaml-build: $(info Pip installing yamllint on $(shell $(PYTHON) --version)...) - python3 -m pip install --upgrade -t tools/pip/site-packages yamllint || \ - python3 -m pip install --upgrade --system -t tools/pip/site-packages yamllint + $(PYTHON) -m pip install --upgrade -t tools/pip/site-packages yamllint || \ + $(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages yamllint .PHONY: lint-yaml # Lints the YAML files with yamllint. lint-yaml: @if [ -f "tools/pip/site-packages/yamllint" ]; then \ - PYTHONPATH=tools/pip python3 -m yamllint .; \ + PYTHONPATH=tools/pip $(PYTHON) -m yamllint .; \ else \ $(warning YAML linting with yamllint is not available) \ $(warning Run 'make lint-yaml-build') \