Commit e6464dd4 authored by Mike Shal's avatar Mike Shal
Browse files

Bug 1611326 - Default to py3_action, and add a py2 attribute to...

Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart

GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D60919

--HG--
extra : moz-landing-system : lando
parent 05e5b507
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ else:
GeneratedFile(
    'xpcAccEvents.h', 'xpcAccEvents.cpp',
    script='AccEventGen.py', entry_point='gen_files',
    py2=True,
    inputs=[
        'AccEvents.conf',
        '!/xpcom/idl-parser/xpidl/xpidllex.py',
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ if CONFIG['COMPILE_ENVIRONMENT']:
        '%sntdll_freestanding.%s' % (CONFIG['LIB_PREFIX'],
                                     CONFIG['LIB_SUFFIX']),
        script='gen_ntdll_freestanding_lib.py',
        py2=True,
        inputs=['ntdll_freestanding.def'],
        flags=[CONFIG['LLVM_DLLTOOL']] + CONFIG['LLVM_DLLTOOL_FLAGS'])

+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ if CONFIG['MOZ_UPDATER']:
        'en-US/updater/updater.ini',
        '../installer/windows/nsis/updater_append.ini',
    ]
    updater.py2 = True
    # Yes, this is weird, but what can you do? This file doesn't want to be in the DIST_SUBDIR,
    # but we can't really move it to a different directory until we change how locale repacks
    # work.
@@ -34,6 +35,7 @@ bookmarks.inputs = [
    # The `locales/en-US/` will be rewritten to the locale-specific path.
    'en-US/profile/bookmarks.inc',
]
bookmarks.py2 = True

with Files("**"):
    BUG_COMPONENT = ("Firefox Build System", "General")
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ if CONFIG['ENABLE_MOZSEARCH_PLUGIN']:
    ]

GeneratedFile('ThirdPartyPaths.cpp', script="ThirdPartyPaths.py",
              py2=True,
              entry_point="generate", inputs=[
                  '/tools/rewriting/ThirdPartyPaths.txt',
                  '/tools/rewriting/Generated.txt',
+3 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ if CONFIG['MOZ_APP_BASENAME']:
        script='../python/mozbuild/mozbuild/action/preprocessor.py',
        entry_point='generate',
        inputs=['application.ini.in'],
        py2=True,
        flags=['-D%s=%s' % (k, '1' if v is True else v)
               for k, v in appini_defines.iteritems()])
    
@@ -95,10 +96,12 @@ if CONFIG['MOZ_APP_BASENAME']:
        FINAL_TARGET_PP_FILES += ['update-settings.ini']

    GeneratedFile('application.ini.h', script='appini_header.py',
                  py2=True,
                  inputs=['!application.ini'])

if CONFIG['ENABLE_TESTS']:
    GeneratedFile('automation.py', script='gen_automation.py',
                  py2=True,
                  inputs=['automation.py.in'])

    TEST_HARNESS_FILES.reftest += [
Loading