Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Docs: Add ensure-venv target to create venv if dir missing
  • Loading branch information
hugovk committed Oct 14, 2022
commit 325db7f62d8d51755c8355ad62cca7433efbb80d
7 changes: 6 additions & 1 deletion Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ help:
@echo " dist to create a \"dist\" directory with archived docs for download"
@echo " check to run a check for frequent markup errors"

build:
build: ensure-venv
-mkdir -p build
# Look first for a Misc/NEWS file (building from a source release tarball
# or old repo) and use that, otherwise look for a Misc/NEWS.d directory
Expand Down Expand Up @@ -139,6 +139,11 @@ venv:
echo "venv already exists."; \
echo "To recreate it, remove it first with \`make clean-venv'."; \
else \
$(MAKE) ensure-venv; \
fi

ensure-venv:
@if [ ! -d $(VENVDIR) ] ; then \
$(PYTHON) -m venv $(VENVDIR); \
$(VENVDIR)/bin/python3 -m pip install -U pip setuptools; \
$(VENVDIR)/bin/python3 -m pip install -r requirements.txt; \
Expand Down