Merge branch 'corvuscorax/OP-1456_struct_to_array_improvement' into next
[librepilot.git] / ground / openpilotgcs / src / python.pri
blob0ce268be52e23d5c5cfdbdeaadd47f4d89b37a02
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\"
12 } else {
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\"
16     } else {
17         # not found, hope it's in the path...
18         PYTHON_VER = "$$system(python --version 2>&1)"
19         contains(PYTHON_VER, "Python 2.*") {
20             PYTHON = \"python\"
21         } else {
22             PYTHON = \"python2\"
23         }
24     }
27 PYTHON = $$replace(PYTHON, \\\\, /)
28 message(Using python interpreter: $$PYTHON)