diff options
author | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-03-30 20:50:09 +0200 |
---|---|---|
committer | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2022-04-02 16:43:53 +0200 |
commit | 63b7c084faa1ef42ac22d94ad2832903caf954aa (patch) | |
tree | 92aef62cd0c821ed4922480f78458a6dab9140e4 /coin_build_instructions.py | |
parent | 7e87bbbe1f59e275d1076b90ab9b1cd640bef78a (diff) |
flake8: fix style issues in coin files
Change-Id: Ie36b52d68cdf85f7f1ab34082461f1875313d17f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'coin_build_instructions.py')
-rw-r--r-- | coin_build_instructions.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/coin_build_instructions.py b/coin_build_instructions.py index ba281eb4d..04b4e118a 100644 --- a/coin_build_instructions.py +++ b/coin_build_instructions.py @@ -36,20 +36,18 @@ ## $QT_END_LICENSE$ ## ############################################################################# -from build_scripts.options import has_option -from build_scripts.options import option_value, log -from build_scripts.utils import install_pip_dependencies, expand_clang_variables -from build_scripts.utils import get_qtci_virtualEnv -from build_scripts.utils import run_instruction -from build_scripts.utils import rmtree -from build_scripts.utils import parse_cmake_conf_assignments_by_key -from build_scripts.utils import get_ci_qtpaths_path -import os -import datetime import calendar +import datetime +import os import site import sys +from build_scripts.options import has_option, log, option_value +from build_scripts.utils import (expand_clang_variables, get_ci_qtpaths_path, + get_qtci_virtualEnv, + parse_cmake_conf_assignments_by_key, rmtree, + run_instruction) + log.set_verbosity(log.INFO) # Values must match COIN thrift @@ -74,7 +72,6 @@ if CI_TEST_PHASE not in ["ALL", "BUILD", "WHEEL"]: CI_TEST_PHASE = "ALL" - def get_current_script_path(): """ Returns the absolute path containing this script. """ try: @@ -84,6 +81,7 @@ def get_current_script_path(): this_file = os.path.abspath(this_file) return os.path.dirname(this_file) + def is_snapshot_build(): """ Returns True if project needs to be built with --snapshot-build @@ -105,6 +103,7 @@ def is_snapshot_build(): return True return False + def call_setup(python_ver, phase): print("call_setup") print("python_ver", python_ver) @@ -128,8 +127,10 @@ def call_setup(python_ver, phase): try: run_instruction([v_env, "--version"], "Using default virtualenv") except Exception as e: + log.info("Failed to use the default virtualenv") + log.info(f"{type(e).__name__}: {e}") v_env = "virtualenv" - run_instruction([v_env, "-p", _pExe, _env], "Failed to create virtualenv") + run_instruction([v_env, "-p", _pExe, _env], "Failed to create virtualenv") # When the 'python_ver' variable is empty, we are using Python 2 # Pip is always upgraded when CI template is provisioned, upgrading it in later phase may cause perm issue run_instruction([env_pip, "install", "-r", "requirements.txt"], "Failed to install dependencies") @@ -177,6 +178,7 @@ def call_setup(python_ver, phase): cmd = [env_python, "create_wheels.py"] run_instruction(cmd, "Failed to create new wheels", initial_env=env) + if __name__ == "__main__": # Remove some environment variables that impact cmake @@ -186,7 +188,7 @@ if __name__ == "__main__": if os.environ.get(env_var): del os.environ[env_var] python_ver = "3" - if CI_TARGET_OS in["Linux"]: + if CI_TARGET_OS in ["Linux"]: python_ver = "3.8" if CI_TEST_PHASE in ["ALL", "BUILD"]: |