diff options
Diffstat (limited to 'build_files/utils')
-rwxr-xr-x | build_files/utils/make_test.py | 2 | ||||
-rwxr-xr-x | build_files/utils/make_update.py | 6 | ||||
-rwxr-xr-x | build_files/utils/make_utils.py | 7 |
3 files changed, 15 insertions, 0 deletions
diff --git a/build_files/utils/make_test.py b/build_files/utils/make_test.py index 15bd6dde352..7f15195f8f9 100755 --- a/build_files/utils/make_test.py +++ b/build_files/utils/make_test.py @@ -12,6 +12,7 @@ from make_utils import call # Parse arguments + def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument("--ctest-command", default="ctest") @@ -22,6 +23,7 @@ def parse_arguments(): parser.add_argument("build_directory") return parser.parse_args() + args = parse_arguments() git_command = args.git_command svn_command = args.svn_command diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py index 324bb6944bf..ae7269b07cd 100755 --- a/build_files/utils/make_update.py +++ b/build_files/utils/make_update.py @@ -14,12 +14,15 @@ import sys import make_utils from make_utils import call, check_output + def print_stage(text): print("") print(text) print("") # Parse arguments + + def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument("--no-libraries", action="store_true") @@ -31,10 +34,13 @@ def parse_arguments(): parser.add_argument("--use-centos-libraries", action="store_true") return parser.parse_args() + def get_blender_git_root(): return check_output([args.git_command, "rev-parse", "--show-toplevel"]) # Setup for precompiled libraries and tests from svn. + + def svn_update(args, release_version): svn_non_interactive = [args.svn_command, '--non-interactive'] diff --git a/build_files/utils/make_utils.py b/build_files/utils/make_utils.py index e94c8e3550a..ce87bdd46e4 100755 --- a/build_files/utils/make_utils.py +++ b/build_files/utils/make_utils.py @@ -7,6 +7,7 @@ import shutil import subprocess import sys + def call(cmd, exit_on_error=True): print(" ".join(cmd)) @@ -19,6 +20,7 @@ def call(cmd, exit_on_error=True): sys.exit(retcode) return retcode + def check_output(cmd, exit_on_error=True): # Flush to ensure correct order output on Windows. sys.stdout.flush() @@ -35,6 +37,7 @@ def check_output(cmd, exit_on_error=True): return output.strip() + def git_branch(git_command): # Get current branch name. try: @@ -45,6 +48,7 @@ def git_branch(git_command): return branch.strip().decode('utf8') + def git_tag(git_command): # Get current tag name. try: @@ -54,6 +58,7 @@ def git_tag(git_command): return tag.strip().decode('utf8') + def git_branch_release_version(branch, tag): release_version = re.search("^blender-v(.*)-release$", branch) if release_version: @@ -64,6 +69,7 @@ def git_branch_release_version(branch, tag): release_version = release_version.group(1) return release_version + def svn_libraries_base_url(release_version): if release_version: svn_branch = "tags/blender-" + release_version + "-release" @@ -71,6 +77,7 @@ def svn_libraries_base_url(release_version): svn_branch = "trunk" return "https://svn.blender.org/svnroot/bf-blender/" + svn_branch + "/lib/" + def command_missing(command): # Support running with Python 2 for macOS if sys.version_info >= (3, 0): |