Skip to content

Commit

Permalink
chore: ensure that pipenv is installed. (#14469)
Browse files Browse the repository at this point in the history
The current "out-of-the-box" dev experience fails in the following way
- `make setup` first invokes
- `make setup-js` before it runs `make setup-py`
- setup-js invokes a sub-make for the app shell which requires pipenv already setup to build the python protocol analysis sandbox.

This is fine if you've already run things before and have pipenv installed locally but it means the standard experience following the dev guides fails.

This pulls out the minimal python setup as a dependency of both the setup-py and setup-js build targets
  • Loading branch information
strangemonad authored Feb 12, 2024
1 parent d93fdc7 commit bb32772
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)


Expand Down

0 comments on commit bb32772

Please sign in to comment.