Skip to content

Commit

Permalink
fix: ensure that pipenv is installed.
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 committed Feb 11, 2024
1 parent 4c4f491 commit b061f4e
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 b061f4e

Please sign in to comment.