[Bf-blender-cvs] [6dcb4c9b4f5] blender-v2.82-release: Buildbot: Allow building on systems without scl

Sergey Sharybin noreply at git.blender.org
Thu Jan 30 13:32:32 CET 2020


Commit: 6dcb4c9b4f5c9840e09dc184ea5623ab922523b6
Author: Sergey Sharybin
Date:   Thu Jan 30 13:04:58 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB6dcb4c9b4f5c9840e09dc184ea5623ab922523b6

Buildbot: Allow building on systems without scl

Makes it easier to verify changes on local machine without scl
before committing changes to repo.

===================================================================

M	build_files/buildbot/buildbot_utils.py

===================================================================

diff --git a/build_files/buildbot/buildbot_utils.py b/build_files/buildbot/buildbot_utils.py
index eded6646671..b99fab78827 100644
--- a/build_files/buildbot/buildbot_utils.py
+++ b/build_files/buildbot/buildbot_utils.py
@@ -24,6 +24,14 @@ import re
 import subprocess
 import sys
 
+def is_tool(name):
+    """Check whether `name` is on PATH and marked as executable."""
+
+    # from whichcraft import which
+    from shutil import which
+
+    return which(name) is not None
+
 class Builder:
     def __init__(self, name, branch):
         self.name = name
@@ -42,7 +50,10 @@ class Builder:
             self.command_prefix =  []
         elif name.startswith('linux'):
             self.platform = 'linux'
-            self.command_prefix =  ['scl', 'enable', 'devtoolset-6', '--']
+            if is_tool('scl'):
+                self.command_prefix =  ['scl', 'enable', 'devtoolset-6', '--']
+            else:
+                self.command_prefix =  []
         elif name.startswith('win'):
             self.platform = 'win'
             self.command_prefix =  []



More information about the Bf-blender-cvs mailing list