Skip to content
Browse files

Merge PR #2749: python.pri: detect missing 'which' command and try to…

… recover.
  • Loading branch information...
mkrautz committed Jan 22, 2017
2 parents 63661c0 + 0c14aae commit 12b9c9b9845058f0f6caf7ac603b1d82d67c41cb
Showing with 14 additions and 0 deletions.
  1. +14 −0 python.pri
@@ -36,6 +36,20 @@ win32 {
} else {
# If the MUMBLE_PYTHON environment variable wasn't set,
# determine if the 'which' tool is available. We need it
# to determine which python binary on the system to use.
# If 'which' isn't available, error out.
isEmpty(PYTHON) {
# Calling 'which which' is intentional.
# If which is available, it will print the path to it.
# If it isn't available, it will not print anything.
WHICH=$$system(which which 2>/dev/null)
isEmpty(WHICH) {
message("The 'which' command is not available on the system. Unble to search for Python installations. Assuming 'python'... If this is not correct, please point the MUMBLE_PYTHON environment variable at a working Python 2 or Python 3 binary.")
isEmpty(PYTHON) {
PYTHON=$$system(which python 2>/dev/null)

0 comments on commit 12b9c9b

Please sign in to comment.
You can’t perform that action at this time.