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.
This commit is contained in:
IamTheFij 2018-04-11 14:33:10 -07:00
parent 2c1acab3dc
commit 82bbf75e3b
1 changed files with 4 additions and 1 deletions

View File

@ -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