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,11 +1,21 @@
SHELL := /bin/bash
ifeq ($(OS),Windows_NT)
PYTHON_BIN := python
ACTIVATE_SCRIPT := pyenv/Scripts/activate
ifndef ACTIVATE_SCRIPT
ACTIVATE_SCRIPT := pyenv/Scripts/activate
endif
ifndef PYTHON_BIN
PYTHON_BIN := python
endif
else
PYTHON_BIN := python3
ACTIVATE_SCRIPT := pyenv/bin/activate
ifndef ACTIVATE_SCRIPT
ACTIVATE_SCRIPT := pyenv/bin/activate
endif
ifndef PYTHON_BIN
PYTHON_BIN := python3
endif
endif
ifndef ANKI_EXTRA_PIP

View File

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