Skip to content

Commit eaf9d08

Browse files
Trotttargos
authored andcommitted
build: add --no-user for pip commands in Makefile
I ran into "Cannot combine --user and --target" in an environment and adding --no-user seemed to fix it. Refs: https://stackoverflow.com/a/67259534/436641 PR-URL: #40169 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Christian Clauss <[email protected]>
1 parent e22ca06 commit eaf9d08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1392,8 +1392,8 @@ cpplint: lint-cpp
13921392
# Try with '--system' if it fails without; the system may have set '--user'
13931393
lint-py-build:
13941394
$(info Pip installing flake8 linter on $(shell $(PYTHON) --version)...)
1395-
$(PYTHON) -m pip install --upgrade -t tools/pip/site-packages flake8 || \
1396-
$(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages flake8
1395+
$(PYTHON) -m pip install --no-user --upgrade -t tools/pip/site-packages flake8 || \
1396+
$(PYTHON) -m pip install --no-user --upgrade --system -t tools/pip/site-packages flake8
13971397

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

14181418
.PHONY: lint-yaml
14191419
# Lints the YAML files with yamllint.

0 commit comments

Comments
 (0)