From e9ec9de84af6dbc8dbf8ce68a018c61dec150718 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 6 Oct 2020 16:13:55 +0200 Subject: setup.py: Fix some flake8 warnings Fix spaces around operators, missing lines, import order. Change-Id: I05ecafec849578fed6018654fcefaa008b6801e8 Reviewed-by: Cristian Maureira-Fredes --- build_scripts/utils.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'build_scripts/utils.py') diff --git a/build_scripts/utils.py b/build_scripts/utils.py index b0c2f8899..0782ae036 100644 --- a/build_scripts/utils.py +++ b/build_scripts/utils.py @@ -1103,18 +1103,20 @@ def get_qtci_virtualEnv(python_ver, host, hostArch, targetArch): # With windows we are creating building 32-bit target in 64-bit host if hostArch == "X86_64" and targetArch == "X86": if python_ver.startswith("3"): - print("Try to find python from {} env variable".format("PYTHON"+python_ver+"-32_PATH")) - _path = os.getenv("PYTHON"+python_ver+"-32_PATH", "") + var = "PYTHON" + python_ver + "-32_PATH" + print("Try to find python from {} env variable".format(var)) + _path = os.getenv(var, "") _pExe = os.path.join(_path, "python.exe") if not os.path.isfile(_pExe): print("Can't find python.exe from {}, using default python3".format(_pExe)) _pExe = os.path.join(os.getenv("PYTHON3_32_PATH"), "python.exe") else: - _pExe = os.path.join(os.getenv("PYTHON2_32_PATH"), "python.exe") + _pExe = os.path.join(os.getenv("PYTHON2_32_PATH"), "python.exe") else: - if python_ver.startswith("3"): - print("Try to find python from {} env variable".format("PYTHON"+python_ver+"-64_PATH")) - _path = os.getenv("PYTHON"+python_ver+"-64_PATH", "") + if python_ver.startswith("3"): + var = "PYTHON" + python_ver + "-64_PATH" + print("Try to find python from {} env variable".format(var)) + _path = os.getenv(var, "") _pExe = os.path.join(_path, "python.exe") if not os.path.isfile(_pExe): print("Can't find python.exe from {}, using default python3".format(_pExe)) @@ -1159,6 +1161,6 @@ def get_ci_qmake_path(ci_install_dir, ci_host_os): if ci_host_os == "MacOS": return qmake_path + "/bin/qmake" elif ci_host_os == "Windows": - return qmake_path + "\\bin\\qmake.exe" + return qmake_path + "\\bin\\qmake.exe" else: return qmake_path + "/bin/qmake" -- cgit v1.2.3