1 # We use python to extract git version info and generate some other files,
2 # but it may be installed locally. The expected python version should be
3 # kept in sync with make/tools.mk.
4 PYTHON_DIR = qt-5.3.1/Tools/mingw482_32/opt/bin
6 ROOT_DIR = $$GCS_SOURCE_TREE/../..
8 # Search the python using environment override first
9 OPENPILOT_TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR)
10 !isEmpty(OPENPILOT_TOOLS_DIR):exists($$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python*) {
11 PYTHON = \"$$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python\"
13 # If not found, search the predefined tools path
14 exists($$ROOT_DIR/tools/$$PYTHON_DIR/python*) {
15 PYTHON = \"$$ROOT_DIR/tools/$$PYTHON_DIR/python\"
17 # not found, hope it's in the path...
18 PYTHON_VER = "$$system(python --version 2>&1)"
19 contains(PYTHON_VER, "Python 2.*") {
27 PYTHON = $$replace(PYTHON, \\\\, /)
28 message(Using python interpreter: $$PYTHON)