Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-01-30 15:04:58 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-01-30 15:32:22 +0300
commit6dcb4c9b4f5c9840e09dc184ea5623ab922523b6 (patch)
treeea824a80184d60e3195321e4a5a13e2af8ca28a6 /build_files
parent944ab366578f2447c6c31370867e689fc661a972 (diff)
Buildbot: Allow building on systems without scl
Makes it easier to verify changes on local machine without scl before committing changes to repo.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/buildbot/buildbot_utils.py13
1 files changed, 12 insertions, 1 deletions
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 = []