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.4.1/Tools/mingw491_32/opt/bin
6 # Search the python using environment override first
7 TOOLS_DIR = $$(TOOLS_DIR)
8 !isEmpty(TOOLS_DIR):exists($$TOOLS_DIR/$$PYTHON_DIR/python*) {
9 PYTHON = \"$$TOOLS_DIR/$$PYTHON_DIR/python\"
11 # If not found, search the predefined tools path
12 exists($$ROOT_DIR/tools/$$PYTHON_DIR/python*) {
13 PYTHON = \"$$ROOT_DIR/tools/$$PYTHON_DIR/python\"
15 # not found, hope it's in the path...
16 PYTHON_VER = "$$system(python --version 2>&1)"
17 contains(PYTHON_VER, "Python 2.*") {
25 PYTHON = $$replace(PYTHON, \\\\, /)
26 message(Using python interpreter: $$PYTHON)