aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-04-23 14:20:49 +0200
committerSimo Fält <simo.falt@qt.io>2018-04-24 16:18:08 +0000
commit4bddc6f10da5bf4e8a108664b6e0eed3062b6d16 (patch)
tree0d7a87f2acc9dd3d4d87b405beefe31ef454c9e4
parent4cedac360986b3cdc21519b102d605671e9e7610 (diff)
Remove unused prepare_coin_sources.py file
Change-Id: Id748527a5afe9a6dc12907c81ed9e4d4fd3e1a49 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
-rw-r--r--prepare_coin_sources.py143
1 files changed, 0 insertions, 143 deletions
diff --git a/prepare_coin_sources.py b/prepare_coin_sources.py
deleted file mode 100644
index 58b83d7c3..000000000
--- a/prepare_coin_sources.py
+++ /dev/null
@@ -1,143 +0,0 @@
-#############################################################################
-##
-## Copyright (C) 2016 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of PySide2.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-from __future__ import print_function
-import os
-import sys
-import shutil
-from subprocess import PIPE, Popen
-from utils import option_value
-from utils import run_process
-
-git_server = "git://code.qt.io"
-
-QT_CI_TESTED_SUBMODULE = option_value("module")
-SUBMODULE_BRANCH = option_value("branch")
-
-submodules = {
- "pyside2-tools" : "pyside-tools"
-}
-
-def usage():
- print("""This is a utility script for pyside-setup to prepare its source
-tree for testing by the Qt Continuous Integration (CI). The script will
-checkout all submodules in the pyside-setup/ sources directory except the one
-under test in the CI.
-The submodule to be tested is expected to be found as a sibling directory of
-pyside-setup, from which it is moved under the pyside-setup/sources directory.
-
-Usage:
-python prepare-sources.py --module=pyside/<submodule> --branch=<branch>
-
---module
- Module is one of the submodules in the pyside-setup/source directory.
- The script expects to find this module as a sibling directory of
- pyside-setup. The directory is moved under pyside-setup/sources and
- renamed as expected.
-
---branch
- Branch is the one that will be checked out when cloning pyside-setup's
- submodules from git.
- """)
- sys.exit(0)
-
-def prepare_sources():
- for module_name, repo_name in submodules.items():
- module_dir = os.path.join("sources", module_name)
- if os.path.exists(module_dir) and repo_name != QT_CI_TESTED_SUBMODULE:
- sub_repo = git_server + "/pyside/" + repo_name + ".git"
- try:
- shutil.move(module_dir, module_dir + "_removed")
- except Exception as e:
- raise Exception("!!!!!!!!!!!!! Failed to rename {} ".format(
- module_dir))
- git_checkout_cmd = ["git", "clone", sub_repo, module_dir]
- if run_process(git_checkout_cmd) != 0:
- raise Exception("!!!!!!!!!!!!! Failed to clone the git "
- "submodule {}".format(sub_repo))
- print("************************* CLONED **********************")
- for module_name, repo_name in submodules.items():
- print("***** Preparing {}".format(module_name))
- if repo_name == QT_CI_TESTED_SUBMODULE:
- print("Skipping tested module {} and using sources from Coin "
- "storage instead".format(module_name))
- module_dir = os.path.join("sources", module_name)
- storage_dir = os.path.join("..", QT_CI_TESTED_SUBMODULE)
- try:
- shutil.move(module_dir, module_dir + "_replaced_as_tested")
- except Exception as e:
- raise Exception("!!!!!!!!!!!!! Failed to rename {} ".format(
- module_dir))
- shutil.move(storage_dir, module_dir)
- else:
- module_dir = os.path.join("sources", module_name)
- os.chdir(module_dir)
- #Make sure the branch exists, if not use dev
- _branch = SUBMODULE_BRANCH
- git_list_branch_cmd = ["git", "ls-remote", "origin",
- "refs/heads/" + _branch]
- shell = (sys.platform == "win32")
- result = Popen(git_list_branch_cmd, stdout=PIPE, shell=shell)
- if len(result.communicate()[0].split())==0:
- print("Warning: Requested {} branch doesn't exist so we'll "
- "fall back to 'dev' branch instead".format(
- SUBMODULE_BRANCH))
- _branch = "dev"
- print("Checking out submodule {} to branch {}".format(module_name,
- _branch))
- git_checkout_cmd = ["git", "checkout", _branch]
- if run_process(git_checkout_cmd) != 0:
- print("Failed to initialize the git submodule {}".format(
- module_name))
- else:
- print("Submodule {} has branch {} checked out".format(
- module_name, _branch))
- os.chdir(script_dir)
-
-
-if QT_CI_TESTED_SUBMODULE is not None:
- QT_CI_TESTED_SUBMODULE = QT_CI_TESTED_SUBMODULE.split('/')[1]
-
-if SUBMODULE_BRANCH is None:
- usage()
-
-script_dir = os.getcwd()
-
-if __name__ == "__main__":
- prepare_sources()