Bug 1262760 - Use the objdir's virtualenv's python executable. r=jlund
--- 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(