Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: mozharness/mozilla/l10n/multi_locale_build.py

Issue 29633713: Issue 6077 - Create script to modify the list of search engines dynamically (Closed)
Patch Set: Created Dec. 8, 2017, 3:37 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # ***** BEGIN LICENSE BLOCK ***** 2 # ***** BEGIN LICENSE BLOCK *****
3 # This Source Code Form is subject to the terms of the Mozilla Public 3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 # You can obtain one at http://mozilla.org/MPL/2.0/. 5 # You can obtain one at http://mozilla.org/MPL/2.0/.
6 # ***** END LICENSE BLOCK ***** 6 # ***** END LICENSE BLOCK *****
7 """multi_locale_build.py 7 """multi_locale_build.py
8 8
9 This should be a mostly generic multilocale build script. 9 This should be a mostly generic multilocale build script.
10 """ 10 """
11 11
12 from copy import deepcopy 12 from copy import deepcopy
13 import os 13 import os
14 import sys 14 import sys
15 15
16 sys.path.insert(1, os.path.dirname(os.path.dirname(sys.path[0]))) 16 sys.path.insert(1, os.path.dirname(os.path.dirname(sys.path[0])))
17 17
18 from mozharness.base.errors import MakefileErrorList, SSHErrorList 18 from mozharness.base.errors import MakefileErrorList, SSHErrorList
19 from mozharness.base.log import FATAL 19 from mozharness.base.log import FATAL
20 from mozharness.base.vcs.vcsbase import MercurialScript 20 from mozharness.base.vcs.vcsbase import MercurialScript
21 from mozharness.mozilla.l10n.locales import LocalesMixin 21 from mozharness.mozilla.l10n.locales import LocalesMixin
22 from mozharness.abb.transform_locales import transform_locales as abb_transform_ locales 22 from mozharness.abb.transform_locales import transform_locales as abb_transform_ locales
23 from mozharness.abb.transform_locales import transform_search_engines_list as ab b_transform_search_engines_list
23 24
24 25
25 # MultiLocaleBuild {{{1 26 # MultiLocaleBuild {{{1
26 class MultiLocaleBuild(LocalesMixin, MercurialScript): 27 class MultiLocaleBuild(LocalesMixin, MercurialScript):
27 """ This class targets Fennec multilocale builds. 28 """ This class targets Fennec multilocale builds.
28 We were considering this for potential Firefox desktop multilocale. 29 We were considering this for potential Firefox desktop multilocale.
29 Now that we have a different approach for B2G multilocale, 30 Now that we have a different approach for B2G multilocale,
30 it's most likely misnamed. """ 31 it's most likely misnamed. """
31 config_options = [[ 32 config_options = [[
32 ["--locale"], 33 ["--locale"],
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 def __init__(self, require_config_file=True): 98 def __init__(self, require_config_file=True):
98 LocalesMixin.__init__(self) 99 LocalesMixin.__init__(self)
99 MercurialScript.__init__(self, config_options=self.config_options, 100 MercurialScript.__init__(self, config_options=self.config_options,
100 all_actions=['clobber', 'pull-build-source', 101 all_actions=['clobber', 'pull-build-source',
101 'pull-locale-source', 102 'pull-locale-source',
102 'build', 'package-en-US', 103 'build', 'package-en-US',
103 'upload-en-US', 104 'upload-en-US',
104 'backup-objdir', 105 'backup-objdir',
105 'restore-objdir', 106 'restore-objdir',
106 'add-locales', 107 'add-locales',
108 'abb-transform-search-engines-list ',
107 'abb-transform-locales', 109 'abb-transform-locales',
108 'package-multi', 110 'package-multi',
109 'upload-multi', 'summary'], 111 'upload-multi', 'summary'],
110 require_config_file=require_config_file) 112 require_config_file=require_config_file)
111 113
112 def clobber(self): 114 def clobber(self):
113 c = self.config 115 c = self.config
114 if c['work_dir'] != '.': 116 if c['work_dir'] != '.':
115 path = os.path.join(c['base_work_dir'], c['work_dir']) 117 path = os.path.join(c['base_work_dir'], c['work_dir'])
116 if os.path.exists(path): 118 if os.path.exists(path):
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 # TODO 244 # TODO
243 self.info("Not written yet.") 245 self.info("Not written yet.")
244 246
245 def _process_command(self, **kwargs): 247 def _process_command(self, **kwargs):
246 """Stub wrapper function that allows us to call scratchbox in 248 """Stub wrapper function that allows us to call scratchbox in
247 MaemoMultiLocaleBuild. 249 MaemoMultiLocaleBuild.
248 250
249 """ 251 """
250 return self.run_command(**kwargs) 252 return self.run_command(**kwargs)
251 253
254 def abb_transform_search_engines_list(self):
255 dirs = self.query_abs_dirs()
256 abb_transform_search_engines_list(dirs['abs_mozilla_dir'],
257 dirs['abs_objdir'], self)
258
252 def abb_transform_locales(self): 259 def abb_transform_locales(self):
253 dirs = self.query_abs_dirs() 260 dirs = self.query_abs_dirs()
254 abb_transform_locales(dirs['abs_mozilla_dir'], 261 abb_transform_locales(dirs['abs_mozilla_dir'],
255 dirs['abs_objdir'], self) 262 dirs['abs_objdir'], self)
256 263
257 # __main__ {{{1 264 # __main__ {{{1
258 if __name__ == '__main__': 265 if __name__ == '__main__':
259 pass 266 pass
OLDNEW
« mozharness/abb/transform_locales.py ('K') | « mozharness/abb/transform_locales.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld