Skip to content
Prev Previous commit
Next Next commit
Makefile: Reorganize venv
  • Loading branch information
rffontenelle committed May 10, 2020
commit fc624b17b4e5a06bb7b8b61ce2bb6905af810614
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,12 @@ setup: venv
# other target of this script
.PHONY: venv
venv:
@echo "Setting up $(LANGUAGE_TEAM)'s virtual environment ...";
@if [ ! -d $(VENV) ]; then \
$(PYTHON) -m venv --prompt $(LANGUAGE_TEAM) $(VENV); \
fi

@$(VENV)/bin/python -m pip install -q -r requirements.txt 2> $(VENV)/pip-install.log

@if grep -q 'pip install --upgrade pip' $(VENV)/pip-install.log; then \
$(VENV)/bin/pip install -q --upgrade pip; \
@if [ ! -d $(VENV) ]; then \
echo "Setting up $(LANGUAGE_TEAM)'s virtual environment ..."; \
$(PYTHON) -m venv --prompt $(LANGUAGE_TEAM) $(VENV); \
$(VENV)/bin/python -m pip install --upgrade pip; \
fi
@$(VENV)/bin/pip install --upgrade --requirement requirements.txt


# serve: serve the documentation in a simple local web server, using cpython
Expand Down