From 82bbf75e3be407892f78cb1d6d266c08a6a954b0 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Wed, 11 Apr 2018 14:33:10 -0700 Subject: [PATCH] Makefile now checks for venv and falls back to virtualenv This can be handy for environments that don't have venv installed, but could also result in some unreliable tests. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1a59de7..ab55f58 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ +# Try to use python3 -m venv, but fallback to virtualenv just in case +VENV := $(shell python3 -m venv --help &> /dev/null && echo 'python3 -m venv' || echo 'virtualenv -p python3') + env: - python3 -m venv env + $(VENV) env ./env/bin/pip install -r requirements-dev.txt .PHONY: run