Bug 1262760 - Use the objdir's virtualenv's python executable. r=jlund
☠☠ backed out by c543cd26f4ad ☠ ☠
authorEdmund Wong <ewong@pw-wspx.org>
Wed, 25 May 2016 21:13:00 +0200 (2016-05-25)
changeset 4895 899b41a5e8e5dbf5dc74d9b7ebed076a03cda35d
parent 4890 156ec2bc0a8f42546eac951a952cb32453a7789d
child 4896 47d125ed66c6c84cd19c784ab5061921a3ff53f0
child 4898 c543cd26f4ad1abd0bf401e089f88499bf8c1fcd
push id4131
push useraleth@instantbird.org
push dateThu, 26 May 2016 07:20:10 +0000 (2016-05-26)
reviewersjlund
bugs1262760
Bug 1262760 - Use the objdir's virtualenv's python executable. r=jlund
process/factory.py
--- a/process/factory.py
+++ b/process/factory.py
@@ -1280,25 +1280,29 @@ class MercurialBuildFactory(MozillaBuild
         """Helper function for getting build information into properties.
         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']
+
             # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
             if self.platform.startswith('win'):
                 python = ['c:/mozilla-build/python27/python', '-u']
-            else:
-                python = ['/tools/buildbot/bin/python']
-            if self.mozillaSrcDir:
-                machPath = '%(basedir)s/build/mozilla/mach'
-            else:
-                machPath = '%(basedir)s/build/mach'
+
             # we need abs paths because we are in a non relative workdir
             printconfig_base_command = python + [
                 WithProperties(machPath), 'python',
                 WithProperties('%(basedir)s/build' + '%s/config/printconfigsetting.py' % self.mozillaSrcDir),
                 WithProperties('%(basedir)s/build' + '/%s/dist/bin/application.ini' % self.mozillaObjdir),
             ]
 
             self.addStep(SetProperty(
@@ -1577,25 +1581,29 @@ class MercurialBuildFactory(MozillaBuild
                                             directory='build/%s/dist/install/sea' % self.mozillaObjdir,
                                             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']
+
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
-        else:
-            python = ['/tools/buildbot/bin/python']
-        if self.mozillaSrcDir:
-            machPath = '%(basedir)s/build/mozilla/mach'
-        else:
-            machPath = '%(basedir)s/build/mach'
+
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties(machPath), 'python',
             WithProperties('%(basedir)s/build' + '%s/config/printconfigsetting.py' % self.mozillaSrcDir),
             WithProperties('%(basedir)s/build' + '/%s/dist/bin/application.ini' % self.mozillaObjdir),
         ]
         self.addStep(SetProperty(
             command=printconfig_base_command + ['App', 'BuildID'],
@@ -2075,25 +2083,29 @@ class NightlyBuildFactory(MercurialBuild
             property_name='previous_inipath',
             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']
+
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
-        else:
-            python = ['/tools/buildbot/bin/python']
-        if self.mozillaSrcDir:
-            machPath = '%(basedir)s/build/mozilla/mach'
-        else:
-            machPath = '%(basedir)s/build/mach'
+
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties(machPath), 'python',
             # abs*Dir attrs lie. they are not absolute paths
             WithProperties('%(basedir)s/' + '%s/config/printconfigsetting.py' % self.absMozillaSrcDir),
             WithProperties('%(basedir)s/' + self.absMozillaObjDir + '/%(previous_inipath)s')
         ]
         self.addStep(SetProperty(
@@ -3475,24 +3487,29 @@ class NightlyRepackFactory(BaseRepackFac
             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)
         # 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']
+
+        # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
-        else:
-            python = ['/tools/buildbot/bin/python']
-        if self.mozillaSrcDir:
-            machPath = '%(basedir)s/build/mozilla/mach'
-        else:
-            machPath = '%(basedir)s/build/mach'
+
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties(machPath), 'python',
             # abs*Dir attrs lie. they are not absolute paths
             WithProperties('%(basedir)s/' + '%s/config/printconfigsetting.py' % self.absMozillaSrcDir),
             WithProperties('%(basedir)s/' + self.absMozillaObjDir + '%(inipath)s')
         ]
         self.addStep(SetProperty(