Bug 1262760 - Use the objdir's virtualenv's python executable.
authorJustin Wood <Callek@gmail.com>
Tue, 07 Jun 2016 14:35:26 -0400 (2016-06-07)
changeset 4906 646b380589aae77c2ca3df2c75ebcc4e5f6b7b14
parent 4905 370d289d34a0671c520d690723b5fcd5be258d49
child 4907 31f3602495cb4f56ab2dd70b6c221a29c7620063
child 4908 6f6a9824ca4dcfdefa65a48bb33b65c40d0c101e
push id4141
push userCallek@gmail.com
push dateTue, 07 Jun 2016 18:54:07 +0000 (2016-06-07)
bugs1262760
Bug 1262760 - Use the objdir's virtualenv's python executable.
process/factory.py
--- a/process/factory.py
+++ b/process/factory.py
@@ -1281,23 +1281,19 @@ class MercurialBuildFactory(MozillaBuild
         Looks for self._gotBuildInfo to make sure we only run this set of steps
         once."""
         if not getattr(self, '_gotBuildInfo', False):
             printconfig_env = self.env.copy()
             printconfig_env.update({'TOOLTOOL_DIR': WithProperties('%(basedir)s/build')})
             del printconfig_env['MOZ_OBJDIR']
             printconfig_workdir = WithProperties('%(basedir)s/build/' + self.objdir)
 
-            if self.mozillaSrcDir:
-                machPath = '%(basedir)s/build/mozilla/mach'
-                python = [WithProperties('%(basedir)s/' +
-                          '%s/_virtualenv/bin/python' % self.absMozillaObjDir)]
-            else:
-                machPath = '%(basedir)s/build/mach'
-                python = ['/tools/buildbot/bin/python']
+            machPath = '%(basedir)s' + self.absMozillaSrcDir + '/mach'
+            python = [WithProperties('%(basedir)s/' +
+                      '%s/_virtualenv/bin/python' % self.absMozillaObjDir)]
 
             # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
             if self.platform.startswith('win'):
                 python = ['c:/mozilla-build/python27/python', '-u']
 
             # we need abs paths because we are in a non relative workdir
             printconfig_base_command = python + [
                 WithProperties(machPath), 'python',
@@ -1582,23 +1578,19 @@ class MercurialBuildFactory(MozillaBuild
                                             fileType='installer',
                                             haltOnFailure=True)
 
         printconfig_env = self.env.copy()
         printconfig_env.update({'TOOLTOOL_DIR': WithProperties('%(basedir)s/build')})
         del printconfig_env['MOZ_OBJDIR']
         printconfig_workdir = WithProperties('%(basedir)s/build/' + self.objdir)
 
-        if self.mozillaSrcDir:
-            machPath = '%(basedir)s/build/mozilla/mach'
-            python = [WithProperties('%(basedir)s/' +
-                      '%s/_virtualenv/bin/python' % self.absMozillaObjDir)]
-        else:
-            machPath = '%(basedir)s/build/mach'
-            python = ['/tools/buildbot/bin/python']
+        machPath = '%(basedir)s' + self.absMozillaSrcDir + '/mach'
+        python = [WithProperties('%(basedir)s/' +
+                  '%s/_virtualenv/bin/python' % self.absMozillaObjDir)]
 
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
 
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties(machPath), 'python',
@@ -2084,23 +2076,19 @@ class NightlyBuildFactory(MercurialBuild
             workdir=self.absMozillaObjDir,
             haltOnFailure=True,
         ))
         printconfig_env = self.env.copy()
         printconfig_env.update({'TOOLTOOL_DIR': WithProperties('%(basedir)s/build')})
         del printconfig_env['MOZ_OBJDIR']
         printconfig_workdir = WithProperties('%(basedir)s/build/' + self.objdir)
 
-        if self.mozillaSrcDir:
-            machPath = '%(basedir)s/build/mozilla/mach'
-            python = [WithProperties('%(basedir)s/' +
-                      '%s/_virtualenv/bin/python' % self.absMozillaObjDir)]
-        else:
-            machPath = '%(basedir)s/build/mach'
-            python = ['/tools/buildbot/bin/python']
+        machPath = '%(basedir)s' + self.absMozillaSrcDir + '/mach'
+        python = [WithProperties('%(basedir)s/' +
+                  '%s/_virtualenv/bin/python' % self.absMozillaObjDir)]
 
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
 
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties(machPath), 'python',
@@ -3488,23 +3476,19 @@ class NightlyRepackFactory(BaseRepackFac
             haltOnFailure=True,
         ))
         printconfig_env = self.env.copy()
         printconfig_env.update({'TOOLTOOL_DIR': WithProperties('%(basedir)s/build')})
         del printconfig_env['MOZ_OBJDIR']
         printconfig_workdir = WithProperties('%(basedir)s/build/' + self.objdir)
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
 
-        if self.mozillaSrcDir:
-            machPath = '%(basedir)s/build/mozilla/mach'
-            python = [WithProperties('%(basedir)s/' +
-                      '%s/_virtualenv/bin/python' % self.absMozillaObjDir)]
-        else:
-            machPath = '%(basedir)s/build/mach'
-            python = ['/tools/buildbot/bin/python']
+        machPath = '%(basedir)s' + self.absMozillaSrcDir + '/mach'
+        python = [WithProperties('%(basedir)s/' +
+                  '%s/_virtualenv/bin/python' % self.absMozillaObjDir)]
 
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
 
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties(machPath), 'python',