Fix missing python3 command on Windows
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 3 Sep 2019 12:09:36 +0000 (14:09 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 3 Sep 2019 12:09:36 +0000 (14:09 +0200)
master.cfg

index 25a5cabfcec44af63b5e28928b620635ed4fcfc0..b3c33c610f4c74bffa2ddb46c67510dad9a76cce 100644 (file)
@@ -277,9 +277,9 @@ def lib_svn_step(dir):
                      workdir='lib/' + dir)
 
 
-def rsync_step(id, branch, rsync_script):
+def rsync_step(python_command, id, branch, rsync_script):
     return ShellCommand(name='rsync',
-                        command=['python3', rsync_script, id, branch],
+                        command=[python_command, rsync_script, id, branch],
                         description='uploading',
                         descriptionDone='uploaded',
                         workdir='install')
@@ -299,6 +299,11 @@ def generic_builder(id, libdir='', branch='', rsync=False):
     if libdir != '':
         f.addStep(lib_svn_step(libdir))
 
+    if id.startswith('win'):
+        python_command = 'python'
+    else:
+        python_command = 'python3'
+
     f.addStep(lib_svn_step('tests'))
 
     for submodule in ('blender-translations',
@@ -310,18 +315,18 @@ def generic_builder(id, libdir='', branch='', rsync=False):
     f.addStep(git_step(branch))
     f.addStep(git_submodules_update())
 
-    f.addStep(Compile(command=['python3', compile_script, id], timeout=3600))
-    f.addStep(Test(command=['python3', test_script, id]))
+    f.addStep(Compile(command=[python_command, compile_script, id], timeout=3600))
+    f.addStep(Test(command=[python_command, test_script, id]))
     f.addStep(ShellCommand(
         name='package',
-        command=['python3',
+        command=[python_command,
                  pack_script,
                  id,
                  branch or Interpolate('%(src:blender:branch)s')],
         description='packaging',
         descriptionDone='packaged'))
     if rsync:
-        f.addStep(rsync_step(id, branch, rsync_script))
+        f.addStep(rsync_step(python_command, id, branch, rsync_script))
     else:
         f.addStep(FileUpload(name='upload',
                              workersrc='buildbot_upload.zip',