From 9460082a9137d6c4c0dae26def08a7920049078c Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Sun, 1 Mar 2020 20:49:45 -0300 Subject: [PATCH] Allow to define a externally PYTHON_BIN and ACTIVATE_SCRIPT --- Makefile | 18 ++++++++++++++---- rspy/Makefile | 8 ++++++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d80a94f4c..8c449998a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/rspy/Makefile b/rspy/Makefile index 78341c7c1..f3cd05ad9 100644 --- a/rspy/Makefile +++ b/rspy/Makefile @@ -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