forked from qt-creator/qt-creator
scripts: build.py: Handle Null path in default_python3()
Change-Id: Ice6b269502a77f31a7af447429bba4332df026e9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -44,7 +44,9 @@ def default_python3():
|
|||||||
path_system = os.path.join('/usr', 'bin') if not common.is_windows_platform() else None
|
path_system = os.path.join('/usr', 'bin') if not common.is_windows_platform() else None
|
||||||
path = os.environ.get('PYTHON3_PATH') or path_system
|
path = os.environ.get('PYTHON3_PATH') or path_system
|
||||||
postfix = '.exe' if common.is_windows_platform() else ''
|
postfix = '.exe' if common.is_windows_platform() else ''
|
||||||
return existing_path(os.path.join(path, 'python3' + postfix)) or existing_path(os.path.join(path, 'python' + postfix))
|
return (path if not path
|
||||||
|
else (existing_path(os.path.join(path, 'python3' + postfix)) or
|
||||||
|
existing_path(os.path.join(path, 'python' + postfix))))
|
||||||
|
|
||||||
def get_arguments():
|
def get_arguments():
|
||||||
parser = argparse.ArgumentParser(description='Build Qt Creator for packaging')
|
parser = argparse.ArgumentParser(description='Build Qt Creator for packaging')
|
||||||
|
Reference in New Issue
Block a user