Allow to define a externally PYTHON_BIN and ACTIVATE_SCRIPT

This commit is contained in:
evandrocoan 2020-03-01 20:49:45 -03:00
parent 7957b51cb8
commit 9460082a91
2 changed files with 20 additions and 6 deletions

View file

@ -1,13 +1,23 @@
SHELL := /bin/bash
ifeq ($(OS),Windows_NT)
PYTHON_BIN := python
ifndef ACTIVATE_SCRIPT
ACTIVATE_SCRIPT := pyenv/Scripts/activate
endif
ifndef PYTHON_BIN
PYTHON_BIN := python
endif
else
PYTHON_BIN := python3
ifndef ACTIVATE_SCRIPT
ACTIVATE_SCRIPT := pyenv/bin/activate
endif
ifndef PYTHON_BIN
PYTHON_BIN := python3
endif
endif
ifndef ANKI_EXTRA_PIP
ANKI_EXTRA_PIP := true
endif

View file

@ -2,10 +2,14 @@ SHELL := /bin/bash
FIND := $(if $(wildcard /bin/find),/bin/find,/usr/bin/find)
ifeq ($(OS),Windows_NT)
ifndef PYTHON_BIN
PYTHON_BIN := python
endif
else
ifndef PYTHON_BIN
PYTHON_BIN := python3
endif
endif
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR: