aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRoman Lacko <backup.rlacko@gmail.com>2012-06-20 16:40:49 +0200
committerRoman Lacko <backup.rlacko@gmail.com>2012-06-20 16:40:49 +0200
commita99ef8ddc8ed81ed4b0fa4615d1c066c5d18d145 (patch)
tree66be00b806e7dcc33aba5149002c656f1af0dfa7 /setup.py
parenta9b7dbc927c2e98f8e1db9e87db67983c428b287 (diff)
pull latest version of submodules and checkout submodules by pyside version
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py35
1 files changed, 31 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index bb4e4fd0e..3eb1aed34 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,22 @@ On Windows You need to execute this script from Visual Studio 2008 Command Promp
Building 64bit version is not supported with Visual Studio 2008 Express Edition.
"""
-__version__ = "1.1.1"
+__version__ = "1.1.2dev"
+
+submodules = {
+ __version__: [
+ ["shiboken", "master"],
+ ["pyside", "master"],
+ ["pyside-tools", "master"],
+ ["pyside-examples", "master"],
+ ],
+ '1.1.1': [
+ ["shiboken", "1.1.1"],
+ ["pyside", "1.1.1"],
+ ["pyside-tools", "0.2.14"],
+ ["pyside-examples", "master"],
+ ],
+}
try:
import setuptools
@@ -85,9 +100,21 @@ for pkg in ["PySide", "pysideuic"]:
# Ensure that git submodules are initialized, if this is the git repo clone
if os.path.isdir(".git"):
- git_cmd = ["git", "submodule", "update", "--init"]
- if run_process(git_cmd) != 0:
- print("Failed to initialize the git submodules")
+ print("Initializing submodules for PySide version %s" % __version__)
+ git_pull_cmd = ["git", "submodule", "foreach", "git", "pull", "origin", "master"]
+ if run_process(git_pull_cmd) != 0:
+ raise DistutilsSetupError("Failed to initialize the git submodules")
+ submodules_dir = os.path.join(script_dir, "sources")
+ for m in submodules[__version__]:
+ module_name = m[0]
+ module_version = m[1]
+ print("Checking out submodule %s to branch %s" % (module_name, module_version))
+ module_dir = os.path.join(submodules_dir, module_name)
+ os.chdir(module_dir)
+ git_checkout_cmd = ["git", "checkout", module_version]
+ if run_process(git_checkout_cmd) != 0:
+ raise DistutilsSetupError("Failed to initialize the git submodule %s" % module_name)
+ os.chdir(script_dir)
def has_option(name):
try: