Make update: Fixes for blender 3.3 release branch #104877

Merged
Sergey Sharybin merged 3 commits from Sergey/blender:buildbot_33 into blender-v3.3-release 2023-02-17 15:24:43 +01:00
1 changed files with 23 additions and 4 deletions

View File

@ -36,7 +36,16 @@ def parse_arguments():
parser.add_argument("--svn-command", default="svn")
parser.add_argument("--svn-branch", default=None)
parser.add_argument("--git-command", default="git")
# NOTE: Both old and new style command line flags, so that the Buildbot can use the new style.
# It is not possible to know from the Buildbot which style to use when building patches.
#
# Acts as an alias: `use_centos_libraries or use_linux_libraries`.
parser.add_argument("--use-centos-libraries", action="store_true")
parser.add_argument("--use-linux-libraries", action="store_true")
parser.add_argument("--architecture", type=str, choices=("x86_64", "amd64", "arm64",))
return parser.parse_args()
@ -45,6 +54,16 @@ def get_blender_git_root():
# Setup for precompiled libraries and tests from svn.
def get_effective_architecture(args):
if args.architecture:
return args.architecture
# Check platform.version to detect arm64 with x86_64 python binary.
if "ARM64" in platform.version():
return "arm64"
return platform.machine().lower()
def svn_update(args, release_version):
svn_non_interactive = [args.svn_command, '--non-interactive']
@ -53,11 +72,11 @@ def svn_update(args, release_version):
svn_url = make_utils.svn_libraries_base_url(release_version, args.svn_branch)
# Checkout precompiled libraries
architecture = get_effective_architecture(args)
if sys.platform == 'darwin':
# Check platform.version to detect arm64 with x86_64 python binary.
if platform.machine() == 'arm64' or ('ARM64' in platform.version()):
if architecture == 'arm64':
lib_platform = "darwin_arm64"
elif platform.machine() == 'x86_64':
elif architecture == 'x86_64':
lib_platform = "darwin"
else:
lib_platform = None
@ -66,7 +85,7 @@ def svn_update(args, release_version):
# this script is bundled as part of the precompiled libraries. However it
# is used by the buildbot.
lib_platform = "win64_vc15"
elif args.use_centos_libraries:
elif args.use_centos_libraries or args.use_linux_libraries:
lib_platform = "linux_centos7_x86_64"
else:
# No precompiled libraries for Linux.