Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add --no-user for pip commands in Makefile #40169

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1392,8 +1392,8 @@ cpplint: lint-cpp
# Try with '--system' if it fails without; the system may have set '--user'
lint-py-build:
$(info Pip installing flake8 linter on $(shell $(PYTHON) --version)...)
$(PYTHON) -m pip install --upgrade -t tools/pip/site-packages flake8 || \
$(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages flake8
$(PYTHON) -m pip install --no-user --upgrade -t tools/pip/site-packages flake8 || \
$(PYTHON) -m pip install --no-user --upgrade --system -t tools/pip/site-packages flake8

ifneq ("","$(wildcard tools/pip/site-packages/flake8)")
.PHONY: lint-py
Expand All @@ -1412,8 +1412,8 @@ endif
# Try with '--system' if it fails without; the system may have set '--user'
lint-yaml-build:
$(info Pip installing yamllint on $(shell $(PYTHON) --version)...)
$(PYTHON) -m pip install --upgrade -t tools/pip/site-packages yamllint || \
$(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages yamllint
$(PYTHON) -m pip install --no-user --upgrade -t tools/pip/site-packages yamllint || \
$(PYTHON) -m pip install --no-user --upgrade --system -t tools/pip/site-packages yamllint

.PHONY: lint-yaml
# Lints the YAML files with yamllint.
Expand Down