diff --git a/Makefile b/Makefile index 03c88d4ad68..a01d2308eaf 100755 --- a/Makefile +++ b/Makefile @@ -53,9 +53,15 @@ usb_host=$(shell yarn run -s discovery find -i 169.254) .PHONY: setup setup: setup-js setup-py +# Both the python and JS setup targets depend on a minimal python setup so they can create +# virtual envs using pipenv. +.PHONY: setup-py-toolchain +setup-py-toolchain: + $(OT_PYTHON) -m pip install pipenv==2023.11.15 + # front-end dependecies handled by yarn .PHONY: setup-js -setup-js: +setup-js: setup-py-toolchain yarn config set network-timeout 60000 yarn $(MAKE) -C $(APP_SHELL_DIR) setup @@ -64,8 +70,7 @@ setup-js: PYTHON_SETUP_TARGETS := $(addsuffix -py-setup, $(PYTHON_DIRS)) .PHONY: setup-py -setup-py: - $(OT_PYTHON) -m pip install pipenv==2023.11.15 +setup-py: setup-py-toolchain $(MAKE) $(PYTHON_SETUP_TARGETS)