Skip to content

Commit 34f5281

Browse files
committed
Abort construction of venv if inside a venv.
1 parent d4a0d02 commit 34f5281

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,17 @@ $(SPHINX_CONF):
3939

4040
.PHONY: upgrade_venv
4141
upgrade_venv:
42+
ifdef VIRTUAL_ENV
43+
$(error "Trying to create a venv while being in a venv. Please deactivate from your venv first.")
44+
endif
4245
$(MAKE) -C $(CPYTHON_CLONE)/Doc/ VENVDIR=$(VENV) PYTHON=$(PYTHON) venv
4346

4447

45-
$(VENV)/bin/activate: upgrade_venv
48+
$(VENV)/bin/activate:
49+
ifdef VIRTUAL_ENV
50+
$(error "Trying to create a venv while being in a venv. Please deactivate from your venv first.")
51+
endif
52+
$(MAKE) -C $(CPYTHON_CLONE)/Doc/ VENVDIR=$(VENV) PYTHON=$(PYTHON) venv
4653

4754

4855
.PHONY: progress

0 commit comments

Comments
 (0)