Merge pull request #485 from evandroforks/allow_to_define_python_bin

Allow to define python bin
This commit is contained in:
Damien Elmes 2020-03-03 18:32:55 +10:00 committed by GitHub
commit 20ce1eca96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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: