aboutsummaryrefslogtreecommitdiffstats
path: root/packaging-tools/build_clang_qdoc.py
diff options
context:
space:
mode:
authorPatrik Teivonen <patrik.teivonen@qt.io>2022-05-25 14:14:19 +0300
committerPatrik Teivonen <patrik.teivonen@qt.io>2022-08-05 09:33:47 +0000
commit506b1fe037a1b4fd6f3aec7862ca3fa2ea35006b (patch)
treeb0ff3247aa5b4f5081c17149b9463ea6fcef8636 /packaging-tools/build_clang_qdoc.py
parent6099b89f35499c60eb0ed4be10e40966326ea678 (diff)
Make imports consistent across Python scripts, isort hookv6.4.0-beta3-packaging
-Add isort to Pipfile, isort hook with blackformatter profile -Fix imports in unittest hook -Group and sort imports by their category (PEP8) -Blank line between import groups (PEP8) -Move all imports to toplevel (PEP8) -Don't unnecessarily append to sys.path (PEP8) -Import only required functions (this also helps reduce line length) -Update deprecated imports such as builtins.WindowsError, ConfigParser.readfp -Remove Python 2, cyclic and unused imports -Fix platform dependent imports and remove unnecessaty try-excepts -Remove unnecessary comments before imports, use in-line comments when needed -Rename conflicting functions in imports, variables as absolute imports are recommended (PEP8) Change-Id: I5ac7a3499ea47a6bdc9a9a2b5211841f65c011ea Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
Diffstat (limited to 'packaging-tools/build_clang_qdoc.py')
-rw-r--r--packaging-tools/build_clang_qdoc.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/packaging-tools/build_clang_qdoc.py b/packaging-tools/build_clang_qdoc.py
index 3280dca20..92f2fd0e8 100644
--- a/packaging-tools/build_clang_qdoc.py
+++ b/packaging-tools/build_clang_qdoc.py
@@ -30,20 +30,20 @@
#############################################################################
import os
-import bld_utils
+
import environmentfrombatchfile
-from bld_utils import is_windows, is_linux
+from bld_utils import is_linux, is_windows, runCommand
from read_remote_config import get_pkg_value
from runner import do_execute_sub_process
def git_clone_and_checkout(base_path, remote_repository_url, directory, revision):
- bld_utils.runCommand(['git', 'clone',
- '--config', 'core.eol=lf',
- '--config', 'core.autocrlf=input',
- '--branch', revision,
- '--recursive',
- remote_repository_url, directory], base_path)
+ runCommand(['git', 'clone',
+ '--config', 'core.eol=lf',
+ '--config', 'core.autocrlf=input',
+ '--branch', revision,
+ '--recursive',
+ remote_repository_url, directory], base_path)
def get_clang(base_path, llvm_revision):
@@ -240,14 +240,14 @@ def check_clang(toolchain, build_path, environment):
def package_clang(install_path, result_file_path):
(basepath, dirname) = os.path.split(install_path)
zip_command = ['cmake', '-E', 'tar', 'cvf', result_file_path, '--format=7zip', dirname]
- bld_utils.runCommand(zip_command, basepath)
+ runCommand(zip_command, basepath)
def upload_clang(file_path, remote_path):
(path, filename) = os.path.split(file_path)
scp_bin = '%SCP%' if is_windows() else 'scp'
scp_command = [scp_bin, filename, remote_path]
- bld_utils.runCommand(scp_command, path)
+ runCommand(scp_command, path)
def main():