diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-04 15:13:34 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-04 14:53:04 +0000 |
commit | 9c9b506f3b2cc64da6fbbef9f58ccec7ccfe4457 (patch) | |
tree | 84d1d9a29868b6d28e5d58267f8b80d6790e3461 | |
parent | 704d3aab0f25d6b0d2939f1bb4e95ca73861ca9c (diff) |
Remove the pyside-tools module
Completes 0eec9fecd241a178ca8f09218b9286ae763f29b3.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: I424336c08c9ce4e1db820811f3c7fb207e5a9260
Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | build_scripts/main.py | 43 | ||||
-rw-r--r-- | build_scripts/qp5_tool.py | 2 |
3 files changed, 1 insertions, 47 deletions
diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 42712d639..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "sources/pyside2-tools"] - path = sources/pyside2-tools - url = ../pyside-tools.git diff --git a/build_scripts/main.py b/build_scripts/main.py index a771e2d32..8aeabcd63 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -101,9 +101,6 @@ def get_setuptools_extension_modules(): return extension_modules -# Git submodules: ["submodule_name", "location_relative_to_sources_folder"] -submodules = [["pyside2-tools"]] - try: import setuptools except ImportError: @@ -249,43 +246,6 @@ def prefix(): return name -# Initialize, pull and checkout submodules -def prepare_sub_modules(): - print("Initializing submodules for PySide2 version: {}".format( - get_package_version())) - submodules_dir = os.path.join(setup_script_dir, "sources") - - # Create list of [name, desired branch, absolute path, desired - # branch] and determine whether all submodules are present - need_init_sub_modules = False - - for m in submodules: - module_name = m[0] - module_dir = m[1] if len(m) > 1 else '' - module_dir = os.path.join(submodules_dir, module_dir, module_name) - # Check for non-empty directory (repository checked out) - if not os.listdir(module_dir): - need_init_sub_modules = True - break - - if need_init_sub_modules: - git_update_cmd = ["git", "submodule", "update", "--init"] - if run_process(git_update_cmd) != 0: - m = "Failed to initialize the git submodules: update --init failed" - raise DistutilsSetupError(m) - git_pull_cmd = ["git", "submodule", "foreach", "git", "fetch", "--all"] - if run_process(git_pull_cmd) != 0: - m = "Failed to initialize the git submodules: git fetch --all failed" - raise DistutilsSetupError(m) - else: - print("All submodules present.") - - git_update_cmd = ["git", "submodule", "update"] - if run_process(git_update_cmd) != 0: - m = "Failed to checkout the correct git submodules SHA1s." - raise DistutilsSetupError(m) - - # Single global instance of QtInfo to be used later in multiple code # paths. qtinfo = QtInfo(QMAKE_COMMAND) @@ -307,9 +267,6 @@ def get_qt_version(): def prepare_build(): - if (os.path.isdir(".git") and not OPTION["IGNOREGIT"] and not OPTION["ONLYPACKAGE"] - and not OPTION["REUSE_BUILD"]): - prepare_sub_modules() # Clean up temp build folder. for n in ["build"]: d = os.path.join(setup_script_dir, n) diff --git a/build_scripts/qp5_tool.py b/build_scripts/qp5_tool.py index b023fc58f..d3a9c7158 100644 --- a/build_scripts/qp5_tool.py +++ b/build_scripts/qp5_tool.py @@ -405,7 +405,7 @@ if __name__ == '__main__': with open(config_file, 'w') as f: f.write(DEFAULT_CONFIG_FILE.format(' '.join(DEFAULT_BUILD_ARGS))) - while not os.path.exists('.gitmodules'): + while not os.path.exists('.git'): cwd = os.getcwd() if cwd == '/' or (IS_WINDOWS and len(cwd) < 4): warnings.warn('Unable to find git root', RuntimeWarning) |