mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-01 18:29:16 +01:00
check whether python is python 2 use python2 if not
This commit is contained in:
parent
01b01052a8
commit
455c33fb29
@ -15,7 +15,7 @@ OPENPILOT_TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR)
|
|||||||
PYTHON = \"$$ROOT_DIR/tools/$$PYTHON_DIR/python\"
|
PYTHON = \"$$ROOT_DIR/tools/$$PYTHON_DIR/python\"
|
||||||
} else {
|
} else {
|
||||||
# not found, hope it's in the path...
|
# not found, hope it's in the path...
|
||||||
PYTHON = \"python\"
|
PYTHON = $$(PYTHON)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,7 +597,11 @@ ifeq ($(shell [ -d "$(PYTHON_DIR)" ] && $(ECHO) "exists"), exists)
|
|||||||
else
|
else
|
||||||
# not installed, hope it's in the path...
|
# not installed, hope it's in the path...
|
||||||
# $(info $(EMPTY) WARNING $(call toprel, $(PYTHON_DIR)) not found, using system PATH)
|
# $(info $(EMPTY) WARNING $(call toprel, $(PYTHON_DIR)) not found, using system PATH)
|
||||||
|
ifeq ($(findstring Python 2,$(shell python --version)), Python 2)
|
||||||
export PYTHON := python
|
export PYTHON := python
|
||||||
|
else
|
||||||
|
export PYTHON := python2
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: python_version
|
.PHONY: python_version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user