зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1361912
- Stop defining python2.7 executable as sys.executable; r=ted
The "python2.7" executable is always defined as sys.executable in mozharness configs. This abstraction is not necessary. This commit removes the "python2.7" executable from mozharness configs and just inlines sys.executable instead. MozReview-Commit-ID: 4xiEkoFwekr --HG-- extra : source : a7a7eb83f9cbf1e6dda8472af8aa35fda2edff88 extra : histedit_source : 9075cf31c84937bbc0d05886ee8a5636de1c3c06%2C50f817f93d1436ff46c670b09321523b8c27ab55
This commit is contained in:
Родитель
f738c5cc51
Коммит
d401587884
|
@ -19,7 +19,6 @@ config = {
|
|||
],
|
||||
"buildbot_json_path": "buildprops.json",
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
"buildbot": "/tools/buildbot/bin/buildbot",
|
||||
},
|
||||
'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
|
||||
|
|
|
@ -16,7 +16,6 @@ config = {
|
|||
],
|
||||
"buildbot_json_path": "buildprops.json",
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
"buildbot": "/tools/buildbot/bin/buildbot",
|
||||
},
|
||||
'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
],
|
||||
"buildbot_json_path": "buildprops.json",
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
"buildbot": [
|
||||
sys.executable,
|
||||
'c:\\mozilla-build\\buildbotve\\scripts\\buildbot'
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
],
|
||||
"buildbot_json_path": "buildprops.json",
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
"buildbot": [
|
||||
sys.executable,
|
||||
'c:\\mozilla-build\\buildbotve\\scripts\\buildbot'
|
||||
|
|
|
@ -15,7 +15,6 @@ config = {
|
|||
],
|
||||
"buildbot_json_path": "buildprops.json",
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
"buildbot": "/tools/buildbot/bin/buildbot",
|
||||
},
|
||||
'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
|
||||
|
|
|
@ -17,7 +17,6 @@ config = {
|
|||
],
|
||||
"buildbot_json_path": "buildprops.json",
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
"buildbot": "/tools/buildbot/bin/buildbot",
|
||||
},
|
||||
'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
|
||||
|
|
|
@ -22,7 +22,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -22,7 +22,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -22,7 +22,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -22,7 +22,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -22,7 +22,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -22,7 +22,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -18,7 +18,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -18,7 +18,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -24,7 +24,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -23,7 +23,6 @@ config = {
|
|||
'check-test',
|
||||
],
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
os.path.join(
|
||||
|
|
|
@ -68,7 +68,6 @@ config = {
|
|||
# use mozmake?
|
||||
"enable_mozmake": True,
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
'c:/mozilla-build/buildbotve/virtualenv.py'
|
||||
|
|
|
@ -68,7 +68,6 @@ config = {
|
|||
# use mozmake?
|
||||
"enable_mozmake": True,
|
||||
'exes': {
|
||||
'python2.7': sys.executable,
|
||||
'virtualenv': [
|
||||
sys.executable,
|
||||
'c:/mozilla-build/buildbotve/virtualenv.py'
|
||||
|
|
|
@ -750,9 +750,8 @@ or run without that action (ie: --no-{action})"
|
|||
app_ini_path = dirs['abs_app_ini_path']
|
||||
if (os.path.exists(print_conf_setting_path) and
|
||||
os.path.exists(app_ini_path)):
|
||||
python = self.query_exe('python2.7')
|
||||
cmd = [
|
||||
python, os.path.join(dirs['abs_src_dir'], 'mach'), 'python',
|
||||
sys.executable, os.path.join(dirs['abs_src_dir'], 'mach'), 'python',
|
||||
print_conf_setting_path, app_ini_path,
|
||||
'App', prop
|
||||
]
|
||||
|
@ -1135,9 +1134,8 @@ or run without that action (ie: --no-{action})"
|
|||
return self.warning(ERROR_MSGS['tooltool_manifest_undetermined'])
|
||||
tooltool_manifest_path = os.path.join(dirs['abs_src_dir'],
|
||||
c['tooltool_manifest_src'])
|
||||
python = self.query_exe('python2.7')
|
||||
cmd = [
|
||||
python, '-u',
|
||||
sys.executable, '-u',
|
||||
os.path.join(dirs['abs_src_dir'], 'mach'),
|
||||
'artifact',
|
||||
'toolchain',
|
||||
|
@ -1305,9 +1303,8 @@ or run without that action (ie: --no-{action})"
|
|||
dirs['abs_app_ini_path']),
|
||||
level=error_level)
|
||||
self.info("Setting properties found in: %s" % dirs['abs_app_ini_path'])
|
||||
python = self.query_exe('python2.7')
|
||||
base_cmd = [
|
||||
python, os.path.join(dirs['abs_src_dir'], 'mach'), 'python',
|
||||
sys.executable, os.path.join(dirs['abs_src_dir'], 'mach'), 'python',
|
||||
print_conf_setting_path, dirs['abs_app_ini_path'], 'App'
|
||||
]
|
||||
properties_needed = [
|
||||
|
@ -1644,7 +1641,7 @@ or run without that action (ie: --no-{action})"
|
|||
os.path.join(dirs['abs_src_dir'], 'mach')
|
||||
]
|
||||
else:
|
||||
mach = [self.query_exe('python2.7'), 'mach']
|
||||
mach = [sys.executable, 'mach']
|
||||
|
||||
return_code = self.run_command_m(
|
||||
command=mach + ['--log-no-times', 'build', '-v'],
|
||||
|
@ -1768,9 +1765,8 @@ or run without that action (ie: --no-{action})"
|
|||
def _execute_postflight_build_mach_command(self, mach_command_args):
|
||||
env = self.query_build_env()
|
||||
env.update(self.query_mach_build_env())
|
||||
python = self.query_exe('python2.7')
|
||||
|
||||
command = [python, 'mach', '--log-no-times']
|
||||
command = [sys.executable, 'mach', '--log-no-times']
|
||||
command.extend(mach_command_args)
|
||||
|
||||
self.run_command_m(
|
||||
|
@ -1787,11 +1783,10 @@ or run without that action (ie: --no-{action})"
|
|||
"""generates source archives and uploads them"""
|
||||
env = self.query_build_env()
|
||||
env.update(self.query_mach_build_env())
|
||||
python = self.query_exe('python2.7')
|
||||
dirs = self.query_abs_dirs()
|
||||
|
||||
self.run_command_m(
|
||||
command=[python, 'mach', '--log-no-times', 'configure'],
|
||||
command=[sys.executable, 'mach', '--log-no-times', 'configure'],
|
||||
cwd=dirs['abs_src_dir'],
|
||||
env=env, output_timeout=60*3, halt_on_failure=True,
|
||||
)
|
||||
|
@ -1843,9 +1838,8 @@ or run without that action (ie: --no-{action})"
|
|||
env = self.query_build_env()
|
||||
env.update(self.query_check_test_env())
|
||||
|
||||
python = self.query_exe('python2.7')
|
||||
cmd = [
|
||||
python, 'mach',
|
||||
sys.executable, 'mach',
|
||||
'--log-no-times',
|
||||
'build',
|
||||
'-v',
|
||||
|
@ -2216,9 +2210,8 @@ or run without that action (ie: --no-{action})"
|
|||
env = self.query_build_env()
|
||||
env.update(self.query_mach_build_env())
|
||||
|
||||
python = self.query_exe('python2.7')
|
||||
return_code = self.run_command_m(
|
||||
command=[python, 'mach', 'valgrind-test'],
|
||||
command=[sys.executable, 'mach', 'valgrind-test'],
|
||||
cwd=self.query_abs_dirs()['abs_src_dir'],
|
||||
env=env, output_timeout=self.config.get('max_build_output_timeout', 60 * 40)
|
||||
)
|
||||
|
|
|
@ -146,11 +146,10 @@ class LocalesMixin(ChunkingMixin):
|
|||
def run_compare_locales(self, locale, halt_on_failure=False):
|
||||
dirs = self.query_abs_dirs()
|
||||
env = self.query_l10n_env()
|
||||
python = self.query_exe('python2.7')
|
||||
compare_locales_error_list = list(PythonErrorList)
|
||||
self.rmtree(dirs['abs_merge_dir'])
|
||||
self.mkdir_p(dirs['abs_merge_dir'])
|
||||
command = [python, 'mach', 'compare-locales',
|
||||
command = [sys.executable, 'mach', 'compare-locales',
|
||||
'--merge-dir', dirs['abs_merge_dir'],
|
||||
'--l10n-ini', os.path.join(dirs['abs_locales_src_dir'], 'l10n.ini'),
|
||||
'--l10n-base', dirs['abs_l10n_dir'], locale]
|
||||
|
|
|
@ -698,8 +698,7 @@ class DesktopSingleLocale(LocalesMixin, ReleaseMixin, MockMixin, BuildbotMixin,
|
|||
return self._mach(target=target, env=env)
|
||||
|
||||
def _get_mach_executable(self):
|
||||
python = self.query_exe('python2.7')
|
||||
return [python, 'mach']
|
||||
return [sys.executable, 'mach']
|
||||
|
||||
def _get_make_executable(self):
|
||||
config = self.config
|
||||
|
|
|
@ -172,8 +172,7 @@ class DesktopPartnerRepacks(ReleaseMixin, BuildbotMixin, PurgeMixin,
|
|||
|
||||
def repack(self):
|
||||
"""creates the repacks"""
|
||||
python = self.query_exe("python2.7")
|
||||
repack_cmd = [python, "partner-repacks.py",
|
||||
repack_cmd = [sys.executable, "partner-repacks.py",
|
||||
"-v", self.config['version'],
|
||||
"-n", str(self.config['build_number'])]
|
||||
if self.config.get('platform'):
|
||||
|
|
|
@ -78,10 +78,9 @@ class Repackage(BaseScript):
|
|||
def repackage(self):
|
||||
config = self.config
|
||||
dirs = self.query_abs_dirs()
|
||||
python = self.query_exe('python2.7')
|
||||
infile = os.path.join(config['input_home'], config['input_filename'])
|
||||
outfile = os.path.join(dirs['abs_upload_dir'], config['output_filename'])
|
||||
command = [python, 'mach', '--log-no-times', 'repackage',
|
||||
command = [sys.executable, 'mach', '--log-no-times', 'repackage',
|
||||
'--input', infile,
|
||||
'--output', outfile]
|
||||
return self.run_command(
|
||||
|
@ -135,8 +134,7 @@ class Repackage(BaseScript):
|
|||
|
||||
def _run_configure(self):
|
||||
dirs = self.query_abs_dirs()
|
||||
python = self.query_exe('python2.7')
|
||||
command = [python, 'mach', '--log-no-times', 'configure']
|
||||
command = [sys.executable, 'mach', '--log-no-times', 'configure']
|
||||
return self.run_command(
|
||||
command=command,
|
||||
cwd=dirs['abs_mozilla_dir'],
|
||||
|
|
Загрузка…
Ссылка в новой задаче