Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
authorMike Shal <mshal@mozilla.com>
Fri, 21 Feb 2020 00:05:17 +0000
changeset 514904 7302618003983e94d9bc5b91930e96aa0deb7ff4
parent 514903 38324526e578991aa0ddb6765497f2949d22e6bc
child 514905 b6ba4726dfba029dd0d8567dab62da4ac14d1853
push id37143
push useraiakab@mozilla.com
push dateFri, 21 Feb 2020 05:56:31 +0000
treeherdermozilla-central@0cec40c582f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, kvark, rstewart
bugs1616630
milestone75.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart Differential Revision: https://phabricator.services.mozilla.com/D63438
browser/app/winlauncher/freestanding/moz.build
browser/locales/moz.build
build/clang-plugin/moz.build
build/moz.build
build/test_templates.mozbuild
build/unix/elfhack/inject/moz.build
config/external/ffi/moz.build
config/external/icu/data/moz.build
config/moz.build
devtools/shared/webconsole/moz.build
dom/bindings/moz.build
dom/webgpu/ffi/moz.build
gfx/layers/moz.build
gfx/webrender_bindings/moz.build
intl/hyphenation/glue/moz.build
intl/locale/moz.build
js/src/build/moz.build
js/src/gc/moz.build
js/src/jit/moz.build
layout/style/moz.build
layout/style/test/moz.build
mobile/android/base/moz.build
modules/libpref/moz.build
moz.build
netwerk/socket/neqo_glue/moz.build
security/manager/ssl/moz.build
security/manager/ssl/tests/unit/test_signed_apps/moz.build
toolkit/components/normandy/test/browser/moz.build
toolkit/crashreporter/moz.build
toolkit/library/moz.build
toolkit/locales/moz.build
toolkit/mozapps/extensions/test/browser/moz.build
widget/android/bindings/moz.build
widget/android/moz.build
xpcom/base/moz.build
xpcom/build/moz.build
xpcom/ds/moz.build
xpcom/idl-parser/xpidl/moz.build
xpcom/reflect/xptcall/md/win32/moz.build
xpcom/tests/gtest/moz.build
--- a/browser/app/winlauncher/freestanding/moz.build
+++ b/browser/app/winlauncher/freestanding/moz.build
@@ -41,16 +41,15 @@ OS_LIBS += [
     'ntdll_freestanding',
 ]
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     GeneratedFile(
         '%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'])
 
 DisableStlWrapping()
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'Launcher Process')
--- a/browser/locales/moz.build
+++ b/browser/locales/moz.build
@@ -15,17 +15,16 @@ if CONFIG['MOZ_CRASHREPORTER']:
 if CONFIG['MOZ_UPDATER']:
     LOCALIZED_GENERATED_FILES += ['updater.ini']
     updater = LOCALIZED_GENERATED_FILES['updater.ini']
     updater.script = 'generate_updater_ini.py'
     updater.inputs = [
         '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.
     LOCALIZED_FILES['..'] += ['!updater.ini']
 
 LOCALIZED_GENERATED_FILES += ['bookmarks.html']
 bookmarks = LOCALIZED_GENERATED_FILES['bookmarks.html']
 bookmarks.script = 'generate_bookmarks.py'
--- a/build/clang-plugin/moz.build
+++ b/build/clang-plugin/moz.build
@@ -57,17 +57,16 @@ if CONFIG['ENABLE_MOZSEARCH_PLUGIN']:
     HOST_SOURCES += [
         'mozsearch-plugin/FileOperations.cpp',
         'mozsearch-plugin/JSONFormatter.cpp',
         'mozsearch-plugin/MozsearchIndexer.cpp',
         'mozsearch-plugin/StringOperations.cpp',
     ]
 
 GeneratedFile('ThirdPartyPaths.cpp', script="ThirdPartyPaths.py",
-              py2=True,
               entry_point="generate", inputs=[
                   '/tools/rewriting/ThirdPartyPaths.txt',
                   '/tools/rewriting/Generated.txt',
               ])
 
 HOST_COMPILE_FLAGS['STL'] = []
 HOST_COMPILE_FLAGS['VISIBILITY'] = []
 
--- a/build/moz.build
+++ b/build/moz.build
@@ -82,31 +82,29 @@ if CONFIG['MOZ_APP_BASENAME']:
         if CONFIG[var]:
             appini_defines[var] = True
 
     GeneratedFile(
         'application.ini',
         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()])
     
     FINAL_TARGET_FILES += ['!application.ini']
     if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' and CONFIG['MOZ_UPDATER']:
         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 += [
         '!automation.py',
     ]
 
     TEST_HARNESS_FILES.testing.mochitest += [
         '!automation.py',
--- a/build/test_templates.mozbuild
+++ b/build/test_templates.mozbuild
@@ -19,17 +19,16 @@ def GeneratedTestCertificate(name):
         files = files[part]
     files += ['!%s' % name]
 
 @template
 def GeneratedTestKey(name):
     if not CONFIG['COMPILE_ENVIRONMENT']:
         return
     GeneratedFile(name, script='/security/manager/ssl/tests/unit/pykey.py',
-                  py2=True,
                   inputs=['%s.keyspec' % name])
     # Turn RELATIVEDIR into list entry: like
     # 'security/manager/ssl/tests/unit/bad_certs' ->
     # TEST_HARNESS_FILES.xpcshell.security.manager.ssl.tests.unit.bad_certs.
     files = TEST_HARNESS_FILES.xpcshell
     for part in RELATIVEDIR.split('/'):
         files = files[part]
     files += ['!%s' % name]
--- a/build/unix/elfhack/inject/moz.build
+++ b/build/unix/elfhack/inject/moz.build
@@ -9,17 +9,16 @@
 Library('elfhack_inject')
 
 DIST_INSTALL = False
 
 cpu = CONFIG['CPU_ARCH']
 
 gen_src = '%s.c' % cpu
 GeneratedFile(gen_src, script='copy_source.py', entry_point='copy',
-              py2=True,
               inputs = ['../inject.c'])
 
 SOURCES += [
     '!%s' % gen_src,
 ]
 
 NO_PGO = True
 
--- a/config/external/ffi/moz.build
+++ b/config/external/ffi/moz.build
@@ -12,17 +12,16 @@ else:
     AllowCompilerWarnings()
     NoVisibilityFlags()
 
     CONFIGURE_DEFINE_FILES += [
         '../../../js/src/ctypes/libffi/fficonfig.h',
     ]
     GeneratedFile('../../../js/src/ctypes/libffi/include/ffi.h',
                   script='subst_header.py',
-                  py2=True,
                   inputs=['../../../js/src/ctypes/libffi/include/ffi.h.in'])
 
     LOCAL_INCLUDES += [
         '!/js/src/ctypes/libffi',
         '!/js/src/ctypes/libffi/include',
         '/js/src/ctypes/libffi/include',
         '/js/src/ctypes/libffi/src/%s' % CONFIG['FFI_TARGET_DIR'],
     ]
@@ -81,17 +80,16 @@ else:
         GeneratedFile(
             'win64_aarch.asm',
             inputs=[
                 '/js/src/ctypes/libffi/src/aarch64/win64.asm',
                 '!../../../js/src/ctypes/libffi/fficonfig.h',
                 '!../../../js/src/ctypes/libffi/include/ffi.h',
             ],
             script='preprocess_libffi_asm.py',
-            py2=True,
             flags=['$(DEFINES)', '$(LOCAL_INCLUDES)'])
         SOURCES += ['!win64_aarch.asm']
     elif CONFIG['FFI_TARGET'] == 'X86':
         ffi_srcs = ('ffi.c', 'sysv.S', 'win32.S')
     elif CONFIG['FFI_TARGET'] == 'X86_64':
         ffi_srcs = ('ffi64.c', 'unix64.S', 'ffi.c', 'sysv.S')
     elif CONFIG['FFI_TARGET'] == 'X86_WIN32':
         ffi_srcs = ['ffi.c']
@@ -101,34 +99,32 @@ else:
             ffi_srcs += ['win32.S']
         else:
             # libffi asm needs to be preprocessed for MSVC
             GeneratedFile('win32.asm', inputs=[
                 '/js/src/ctypes/libffi/src/x86/win32.S',
                 '!../../../js/src/ctypes/libffi/fficonfig.h',
                 '!../../../js/src/ctypes/libffi/include/ffi.h',
             ], script='preprocess_libffi_asm.py',
-            py2=True,
             flags=['$(DEFINES)', '$(LOCAL_INCLUDES)'])
             SOURCES += ['!win32.asm']
             ASFLAGS += ['-safeseh']
     elif CONFIG['FFI_TARGET'] == 'X86_WIN64':
         ffi_srcs = ['ffi.c']
         if CONFIG['CC_TYPE'] in ('gcc', 'clang'):
             ffi_srcs += ['win64.S']
         else:
             # libffi asm needs to be preprocessed for MSVC
             GeneratedFile(
                 'win64.asm',
                 inputs=[
                     '/js/src/ctypes/libffi/src/x86/win64.S',
                     '!../../../js/src/ctypes/libffi/fficonfig.h',
                     '!../../../js/src/ctypes/libffi/include/ffi.h',
                 ], script='preprocess_libffi_asm.py',
-                py2=True,
                 flags=['$(DEFINES)', '$(LOCAL_INCLUDES)'])
             SOURCES += ['!win64.asm']
     elif CONFIG['FFI_TARGET'] == 'X86_DARWIN':
         DEFINES['FFI_MMAP_EXEC_WRIT'] = True
         if CONFIG['CPU_ARCH'] == 'x86':
             ffi_srcs = ('ffi.c', 'darwin.S', 'ffi64.c', 'darwin64.S',
                         'win32.S')
             DEFINES['SYMBOL_UNDERSCORE'] = True
--- a/config/external/icu/data/moz.build
+++ b/config/external/icu/data/moz.build
@@ -20,17 +20,16 @@ asflags = [
     '-DICU_DATA_FILE="%s"' % CONFIG['ICU_DATA_FILE'],
     '-DICU_DATA_SYMBOL=%s' % data_symbol,
 ]
 LOCAL_INCLUDES += ['.']
 
 if CONFIG['OS_TARGET'] == 'WINNT' and CONFIG['CPU_ARCH'] == 'aarch64':
     icudata = 'icudata.asm'
     GeneratedFile(icudata, script='genicudata.py',
-                  py2=True,
                   inputs=[CONFIG['ICU_DATA_FILE']], flags=[data_symbol])
     SOURCES += ['!%s' % icudata]
 elif CONFIG['HAVE_YASM']:
     USE_YASM = True
     SOURCES += ['icudata.s']
     ASFLAGS += asflags
 elif CONFIG['GNU_AS']:
     SOURCES += ['icudata_gas.S']
--- a/config/moz.build
+++ b/config/moz.build
@@ -57,35 +57,32 @@ if CONFIG['WRAP_STL_INCLUDES']:
         # file_generate action will create it for us, but we want to create all
         # the files in gen_wrappers()
         outputs = tuple(['stl.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers])
         GENERATED_FILES += [outputs]
         stl = GENERATED_FILES[outputs]
         stl.script = 'make-stl-wrappers.py:gen_wrappers'
         stl.flags = [output_dir, stl_compiler, template_file]
         stl.flags.extend(stl_headers)
-        stl.py2 = True
 
     # Wrap <windows.h> to make it easier to use correctly
     # NOTE: If we aren't wrapping STL includes, we're building part of the browser
     # which won't need this wrapper, such as L10N. Just don't try to generate the
     # wrapper in that case.
     if CONFIG['OS_TARGET'] == 'WINNT':
         GeneratedFile('../dist/stl_wrappers/windows.h',
                       script='make-windows-h-wrapper.py',
                       entry_point='generate',
-                      py2=True,
                       inputs = ['windows-h-constant.decls.h',
                                 'windows-h-unicode.decls.h',
                                 'windows-h-wrapper.template.h'],
                       flags=[stl_compiler])
 
 if CONFIG['WRAP_SYSTEM_INCLUDES']:
     include('system-headers.mozbuild')
     output_dir = '../dist/system_wrappers'
     outputs = tuple(['system-header.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers + system_headers])
     GENERATED_FILES += [outputs]
     system = GENERATED_FILES[outputs]
     system.script = 'make-system-wrappers.py:gen_wrappers'
     system.flags = [output_dir]
     system.flags.extend(stl_headers)
     system.flags.extend(system_headers)
-    system.py2 = True
--- a/devtools/shared/webconsole/moz.build
+++ b/devtools/shared/webconsole/moz.build
@@ -15,17 +15,16 @@ if CONFIG['OS_TARGET'] != 'Android':
 base = FINAL_TARGET_FILES.chrome.devtools.modules
 
 # Now, navigate to the right sub-directory into devtools root modules folder
 for dir in RELATIVEDIR.split('/'):
     base = base[dir]
 base += ["!reserved-js-words.js"]
 
 GeneratedFile('reserved-js-words.js', script='GenerateReservedWordsJS.py',
-              py2=True,
               inputs = ['/js/src/frontend/ReservedWords.h'])
 
 DevToolsModules(
     'js-property-provider.js',
     'network-helper.js',
     'parser-helper.js',
     'throttle.js',
 )
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -171,14 +171,13 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
     # Suppress warnings in third-party code.
     CXXFLAGS += [
         '-Wno-maybe-uninitialized',
     ]
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     GeneratedFile('CSS2Properties.webidl',
                   script='GenerateCSS2PropertiesWebIDL.py',
-                  py2=True,
                   entry_point='generate',
                   inputs=[
                       '/dom/webidl/CSS2Properties.webidl.in',
                       '!/layout/style/ServoCSSPropList.py',
                   ])
--- a/dom/webgpu/ffi/moz.build
+++ b/dom/webgpu/ffi/moz.build
@@ -10,17 +10,16 @@ EXPORTS.mozilla.webgpu.ffi += [
 
 UNIFIED_SOURCES += [
 ]
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     GeneratedFile('wgpu_ffi_generated.h',
                   script='/layout/style/RunCbindgen.py',
                   entry_point='generate',
-                  py2=True,
                   inputs=[
                     '/gfx/wgpu/wgpu-remote',
                   ])
 
     EXPORTS.mozilla.webgpu.ffi += [
         '!wgpu_ffi_generated.h',
     ]
 
--- a/gfx/layers/moz.build
+++ b/gfx/layers/moz.build
@@ -584,20 +584,18 @@ IPDL_SOURCES += [
     'ipc/PWebRenderBridge.ipdl',
     'ipc/WebRenderMessages.ipdlh',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
   GeneratedFile('CompositorD3D11Shaders.h', script='d3d11/genshaders.py',
-                py2=True,
                 inputs=['d3d11/shaders.manifest'])
   GeneratedFile('MLGShaders.h', script='d3d11/genshaders.py',
-                py2=True,
                 inputs=['d3d11/mlgshaders/shaders.manifest'])
 
 LOCAL_INCLUDES += [
     '/docshell/base',  # for nsDocShell.h
     '/layout/base',    # for TouchManager.h
     '/layout/generic', # for nsTextFrame.h
     '/media/libyuv/libyuv/include', # for libyuv.h
 ]
--- a/gfx/webrender_bindings/moz.build
+++ b/gfx/webrender_bindings/moz.build
@@ -88,17 +88,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('and
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     EXPORTS.mozilla.webrender += [
         '!webrender_ffi_generated.h',
     ]
 
     GeneratedFile('webrender_ffi_generated.h',
                   script='/layout/style/RunCbindgen.py', entry_point='generate',
-                  py2=True,
                   inputs=[
                       '/gfx/webrender_bindings',
                       '/gfx/wr/webrender',
                       '/gfx/wr/webrender_api',
                   ])
 
 
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/intl/hyphenation/glue/moz.build
+++ b/intl/hyphenation/glue/moz.build
@@ -26,9 +26,8 @@ if CONFIG['COMPILE_ENVIRONMENT']:
         'mapped_hyph.h'
     ]
 
     generated = GENERATED_FILES['mapped_hyph.h']
     generated.script = '/layout/style/RunCbindgen.py:generate'
     generated.inputs = [
         '/third_party/rust/mapped_hyph'
     ]
-    generated.py2 = True
--- a/intl/locale/moz.build
+++ b/intl/locale/moz.build
@@ -93,16 +93,14 @@ if CONFIG['COMPILE_ENVIRONMENT']:
         '!unic_langid_ffi_generated.h',
     ]
 
     ffi_generated = GENERATED_FILES['unic_langid_ffi_generated.h']
     ffi_generated.script = '/layout/style/RunCbindgen.py:generate'
     ffi_generated.inputs = [
         '/intl/locale/rust/unic-langid-ffi',
     ]
-    ffi_generated.py2 = True
 
     ffi_generated = GENERATED_FILES['fluent_langneg_ffi_generated.h']
     ffi_generated.script = '/layout/style/RunCbindgen.py:generate'
     ffi_generated.inputs = [
         '/intl/locale/rust/fluent-langneg-ffi',
     ]
-    ffi_generated.py2 = True
--- a/js/src/build/moz.build
+++ b/js/src/build/moz.build
@@ -25,17 +25,16 @@ if not CONFIG['JS_STANDALONE']:
 if CONFIG['JS_SHARED_LIBRARY']:
     GeckoSharedLibrary('js', linkage=None)
     SHARED_LIBRARY_NAME = CONFIG['JS_LIBRARY_NAME']
 
     # Ensure symbol versions of shared library on Linux do not conflict
     # with those in libxul.
     if CONFIG['OS_TARGET'] == 'Linux':
         GeneratedFile('symverscript', script='/build/gen_symverscript.py', 
-                      py2=True,
                       inputs=['symverscript.in'], 
                       flags=[CONFIG['JS_LIBRARY_NAME'].replace('-', '_')])
         SYMBOLS_FILE = '!symverscript'
 else:
     Library('js')
 
 FORCE_STATIC_LIB = True
 STATIC_LIBRARY_NAME = 'js_static'
--- a/js/src/gc/moz.build
+++ b/js/src/gc/moz.build
@@ -16,17 +16,16 @@ include('../js-config.mozbuild')
 include('../js-cxxflags.mozbuild')
 
 
 # Generate GC statistics phase data.
 GeneratedFile('StatsPhasesGenerated.h',
               py2=True,
               script='GenerateStatsPhases.py', entry_point='generateHeader')
 GeneratedFile('StatsPhasesGenerated.inc',
-              py2=True,
               script='GenerateStatsPhases.py', entry_point='generateCpp')
 
 UNIFIED_SOURCES += [
     'Allocator.cpp',
     'AtomMarking.cpp',
     'Barrier.cpp',
     'FinalizationGroup.cpp',
     'GC.cpp',
--- a/js/src/jit/moz.build
+++ b/js/src/jit/moz.build
@@ -235,19 +235,17 @@ elif CONFIG['JS_CODEGEN_MIPS32'] or CONF
             UNIFIED_SOURCES += [
                 'mips64/Simulator-mips64.cpp'
             ]
 
 
 # Generate jit/MOpcodes.h from jit/MIR.h
 GeneratedFile('MOpcodes.h',
               script='GenerateOpcodeFiles.py',
-              py2=True,
               entry_point='generate_mir_header',
               inputs=['MIR.h'])
 
 # Generate jit/LOpcodes.h from jit/LIR.h, jit/shared/LIR-shared.h, and
 # platform-specific LIR files.
 GeneratedFile('LOpcodes.h',
               script='GenerateOpcodeFiles.py',
-              py2=True,
               entry_point='generate_lir_header',
               inputs=lir_inputs)
--- a/layout/style/moz.build
+++ b/layout/style/moz.build
@@ -257,59 +257,54 @@ CONTENT_ACCESSIBLE_FILES += [
     'res/plaintext.css',
     'res/viewsource.css',
     'TopLevelImageDocument.css',
     'TopLevelVideoDocument.css',
 ]
 
 
 GeneratedFile('nsCSSPropertyID.h', script='GenerateCSSPropertyID.py',
-              py2=True,
               entry_point='generate',
               inputs=['nsCSSPropertyID.h.in', '!ServoCSSPropList.py'])
 GeneratedFile('ServoCSSPropList.h',
               script='GenerateServoCSSPropList.py',
-              py2=True,
               entry_point='generate_header',
               inputs=['!ServoCSSPropList.py'])
 GeneratedFile('ServoCSSPropList.py',
               script='GenerateServoCSSPropList.py', entry_point='generate_data',
               py2=True,
               inputs=['ServoCSSPropList.mako.py'])
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     EXPORTS.mozilla += [
         '!CompositorAnimatableProperties.h',
         '!CountedUnknownProperties.h',
         '!ServoStyleConsts.h',
     ]
 
     GeneratedFile('CompositorAnimatableProperties.h',
                   script='GenerateCompositorAnimatableProperties.py',
-                  py2=True,
                   entry_point='generate',
                   inputs=['!ServoCSSPropList.py'])
     GeneratedFile(
         'CountedUnknownProperties.h',
         script='GenerateCountedUnknownProperties.py',
-        py2=True,
         entry_point='generate',
         inputs=[
             '/servo/components/style/properties/counted_unknown_properties.py',
         ])
     GeneratedFile('nsComputedDOMStyleGenerated.inc',
                   script='GenerateComputedDOMStyleGenerated.py',
                   py2=True,
                   entry_point='generate',
                   inputs=['!ServoCSSPropList.py'])
     GeneratedFile('nsCSSPropsGenerated.inc',
                   script='GenerateCSSPropsGenerated.py',
                   py2=True,
                   entry_point='generate',
                   inputs=['!ServoCSSPropList.py'])
     GeneratedFile('ServoStyleConsts.h', script='RunCbindgen.py',
-                  py2=True,
                   entry_point='generate',
                   inputs = ['/servo/ports/geckolib', '/servo/components/style'])
 
     CONFIGURE_SUBST_FILES += [
         'bindgen.toml',
     ]
--- a/layout/style/test/moz.build
+++ b/layout/style/test/moz.build
@@ -144,10 +144,9 @@ DEFINES['MOZILLA_INTERNAL_API'] = True
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     GENERATED_FILES += ['css_properties.js']
     GENERATED_FILES['css_properties.js'].script = 'gen-css-properties.py'
     GENERATED_FILES['css_properties.js'].inputs = [
         'css_properties_like_longhand.js',
         '!host_ListCSSProperties%s' % CONFIG['HOST_BIN_SUFFIX'],
     ]
-    GENERATED_FILES['css_properties.js'].py2 = True
     TEST_HARNESS_FILES.testing.mochitest.tests.layout.style.test += ['!css_properties.js']
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -15,9 +15,8 @@ DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG
 # an open FileAvoidWrite to the invoked script.  That doesn't work well with
 # the Gradle task that generates all of the outputs, so we add a dummy first
 # output.
 t = ('android_apks',)
 
 GENERATED_FILES += [t]
 GENERATED_FILES[t].force = True
 GENERATED_FILES[t].script = '/mobile/android/gradle.py:assemble_app'
-GENERATED_FILES[t].py2 = True
--- a/modules/libpref/moz.build
+++ b/modules/libpref/moz.build
@@ -121,17 +121,16 @@ UNIFIED_SOURCES += [
 
 gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
 
 GENERATED_FILES += [gen_all_tuple]
 
 static_pref_list = GENERATED_FILES[gen_all_tuple]
 static_pref_list.script = 'init/generate_static_pref_list.py:emit_code'
 static_pref_list.inputs = ['init/StaticPrefList.yaml']
-static_pref_list.py2 = True
 
 PYTHON_UNITTEST_MANIFESTS += [
     'test/python.ini',
 ]
 
 XPCOM_MANIFESTS += [
     'components.conf',
 ]
--- a/moz.build
+++ b/moz.build
@@ -159,17 +159,16 @@ if not CONFIG['JS_STANDALONE'] or not CO
 
     GENERATED_FILES += [
         'buildid.h',
         'source-repo.h',
     ]
 
     GENERATED_FILES['buildid.h'].script = 'build/variables.py:buildid_header'
     GENERATED_FILES['source-repo.h'].script = 'build/variables.py:source_repo_header'
-    GENERATED_FILES['buildid.h'].py2 = True
     GENERATED_FILES['source-repo.h'].py2 = True
 
     DIRS += [
         'build',
     ]
 
 DIRS += [
     'mfbt',
--- a/netwerk/socket/neqo_glue/moz.build
+++ b/netwerk/socket/neqo_glue/moz.build
@@ -12,14 +12,13 @@ LOCAL_INCLUDES += [
     '/security/manager/ssl',
     '/security/nss/lib/ssl',
 ]
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     GeneratedFile('neqo_glue_ffi_generated.h',
                   script='/layout/style/RunCbindgen.py',
                   entry_point='generate',
-                  py2=True,
                   inputs=['/netwerk/socket/neqo_glue'])
 
     EXPORTS.mozilla.net += [
         '!neqo_glue_ffi_generated.h',
     ]
--- a/security/manager/ssl/moz.build
+++ b/security/manager/ssl/moz.build
@@ -221,17 +221,16 @@ LOCAL_INCLUDES += [
 ]
 
 LOCAL_INCLUDES += [
     '!/dist/public/nss',
 ]
 
 GeneratedFile('nsSTSPreloadList.h',
               script='../../../xpcom/ds/tools/make_dafsa.py',
-              py2=True,
               inputs=['nsSTSPreloadList.inc'])
 
 DEFINES['SSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES'] = 'True'
 DEFINES['NSS_ENABLE_ECC'] = 'True'
 
 if not CONFIG['MOZ_SYSTEM_NSS']:
     USE_LIBS += [
         'crmf',
--- a/security/manager/ssl/tests/unit/test_signed_apps/moz.build
+++ b/security/manager/ssl/tests/unit/test_signed_apps/moz.build
@@ -9,17 +9,16 @@ def SignedAppFile(name, flags, app_direc
     if not CONFIG['COMPILE_ENVIRONMENT']:
         return
 
     GENERATED_FILES += [name]
     props = GENERATED_FILES[name]
     props.script = '/security/manager/ssl/tests/unit/sign_app.py'
     props.inputs = [app_directory]
     props.flags = flags
-    props.py2 = True
     # Turn RELATIVEDIR into list entry: like
     # 'security/manager/ssl/tests/unit/test_signed_apps' ->
     # TEST_HARNESS_FILES.xpcshell.security.manager.ssl.tests.unit.test_signed_apps.
     files = TEST_HARNESS_FILES.xpcshell
     for part in RELATIVEDIR.split('/'):
         files = files[part]
     files += ['!%s' % name]
 
--- a/toolkit/components/normandy/test/browser/moz.build
+++ b/toolkit/components/normandy/test/browser/moz.build
@@ -16,11 +16,10 @@ output_dir = OBJDIR_FILES._tests.testing
 
 for addon in addons:
     indir = 'addons/%s' % addon
     xpi = '%s.xpi' % indir
 
     GENERATED_FILES += [xpi]
     GENERATED_FILES[xpi].script = '../create_xpi.py'
     GENERATED_FILES[xpi].inputs = [indir]
-    GENERATED_FILES[xpi].py2 = True
 
     output_dir += ['!%s' % xpi]
--- a/toolkit/crashreporter/moz.build
+++ b/toolkit/crashreporter/moz.build
@@ -124,16 +124,15 @@ if CONFIG['MOZ_CRASHREPORTER']:
         CXXFLAGS += ['-Wno-shadow']
 else:
     UNIFIED_SOURCES += [
         'nsDummyExceptionHandler.cpp',
     ]
 
 # Generate CrashAnnotations.h
 GeneratedFile('CrashAnnotations.h', script='generate_crash_reporter_sources.py',
-              py2=True,
               entry_point='emit_header', inputs=[
                   'CrashAnnotations.h.in',
                   'CrashAnnotations.yaml',
               ])
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Crash Reporting')
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -80,17 +80,16 @@ def Libxul(name, output_category=None):
     if CONFIG['MOZ_DEBUG_SYMBOLS'] and CONFIG['CC_TYPE'] == 'clang-cl':
         LDFLAGS += ['-NATVIS:%s/toolkit/library/gecko.natvis' % TOPSRCDIR]
     if CONFIG['RUSTC_NATVIS_LDFLAGS']:
         LDFLAGS += CONFIG['RUSTC_NATVIS_LDFLAGS']
 
     if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TARGET'] != 'Android':
         GeneratedFile('symverscript', script='/build/gen_symverscript.py',
                       inputs=['../symverscript.in'],
-                      py2=True,
                       flags=['xul%s' % CONFIG['MOZILLA_SYMBOLVERSION']])
         SYMBOLS_FILE = '!symverscript'
 
     # Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
     # too old to support Python pretty-printers; if this changes, we could
     # make this 'ifdef GNU_CC'.
     if CONFIG['OS_ARCH'] == 'Linux':
         # Create a GDB Python auto-load file alongside the libxul shared library
@@ -372,11 +371,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
 # libxul is rebuilt, we refresh the buildid and link it into libxul.
 SOURCES += ['!buildid.cpp']
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
     libxul_list = 'XUL'
 else:
     libxul_list = '%sxul_%s' % (
         CONFIG['DLL_PREFIX'], CONFIG['DLL_SUFFIX'].lstrip('.').replace('.','_'))
 GeneratedFile('buildid.cpp', script = 'gen_buildid.py',
-              py2=True,
               inputs=['!build/%s.list' % libxul_list])
 
--- a/toolkit/locales/moz.build
+++ b/toolkit/locales/moz.build
@@ -10,17 +10,17 @@ with Files('**'):
 if CONFIG['MOZ_BUILD_APP'] == 'mobile/android':
   DEFINES['MOZ_FENNEC'] = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
   DEFINES['MOZ_GTK'] = True
 
 JAR_MANIFESTS += ['jar.mn']
 
-GeneratedFile('multilocale.txt', script='gen_multilocale.py', py2=True)
+GeneratedFile('multilocale.txt', script='gen_multilocale.py')
 FINAL_TARGET_FILES.res += [
     '!multilocale.txt',
 ]
 
 if CONFIG['MOZ_CRASHREPORTER']:
     if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
         # TODO: fixing bug 1223748 should let us remove this special case
         LOCALIZED_FILES['crashreporter.app'].Contents.Resources += [
@@ -29,10 +29,9 @@ if CONFIG['MOZ_CRASHREPORTER']:
     else:
         LOCALIZED_FILES += [
             'en-US/crashreporter/crashreporter.ini'
         ]
 
 LOCALIZED_GENERATED_FILES += ['update.locale']
 update_locale = LOCALIZED_GENERATED_FILES['update.locale']
 update_locale.script = 'generate_update_locale.py'
-update_locale.py2 = True
 LOCALIZED_FILES += ['!update.locale']
--- a/toolkit/mozapps/extensions/test/browser/moz.build
+++ b/toolkit/mozapps/extensions/test/browser/moz.build
@@ -21,12 +21,11 @@ output_dir = OBJDIR_FILES._tests.testing
 
 for addon in addons:
     indir = 'addons/%s' % addon
     xpi = '%s.xpi' % indir
 
     GENERATED_FILES += [xpi]
     GENERATED_FILES[xpi].script = '../create_xpi.py'
     GENERATED_FILES[xpi].inputs = [indir]
-    GENERATED_FILES[xpi].py2 = True
 
     output_dir += ['!%s' % xpi]
 
--- a/widget/android/bindings/moz.build
+++ b/widget/android/bindings/moz.build
@@ -35,15 +35,14 @@ EXPORTS += ['!%s.h' % stem for stem in g
 # output.
 t = tuple(['sdk_bindings'] +
           ['%s.cpp' % stem for stem in generated] +
           ['%s.h' % stem for stem in generated])
 
 GENERATED_FILES += [t]
 GENERATED_FILES[t].script = '/mobile/android/gradle.py:generate_sdk_bindings'
 GENERATED_FILES[t].inputs += ['%s-classes.txt' % stem for stem in generated]
-GENERATED_FILES[t].py2 = True
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/widget/android',
 ]
--- a/widget/android/moz.build
+++ b/widget/android/moz.build
@@ -77,17 +77,16 @@ include('/ipc/chromium/chromium-config.m
 
 # The recursive make backend treats the first output specially: it's passed as
 # an open FileAvoidWrite to the invoked script.  That doesn't work well with
 # the Gradle task that generates all of the outputs, so we add a dummy first
 # output.
 GeneratedFile(
     'generated_jni_wrappers', 'GeneratedJNINatives.h', 'GeneratedJNIWrappers.h',
     'GeneratedJNIWrappers.cpp', script='/mobile/android/gradle.py',
-    py2=True,
     entry_point='generate_generated_jni_wrappers')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/docshell/base',
     '/dom/base',
     '/dom/system/android',
--- a/xpcom/base/moz.build
+++ b/xpcom/base/moz.build
@@ -221,17 +221,16 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wi
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     EXPORTS.mozilla += [
         '!gk_rust_utils_ffi_generated.h',
     ]
 
     GeneratedFile('gk_rust_utils_ffi_generated.h',
                   script='/layout/style/RunCbindgen.py',
-                  py2=True,
                   entry_point='generate', inputs=['/xpcom/rust/gkrust_utils'])
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../build',
--- a/xpcom/build/moz.build
+++ b/xpcom/build/moz.build
@@ -65,19 +65,19 @@ UNIFIED_SOURCES += [
 
 SOURCES += ['!Services.cpp']
 
 if CONFIG['OS_ARCH'] != 'WINNT':
     SOURCES += [
         'NSPRInterposer.cpp',
     ]
 
-GeneratedFile('Services.cpp', script='Services.py', entry_point='services_cpp', py2=True)
-GeneratedFile('Services.h', script='Services.py', entry_point='services_h', py2=True)
-GeneratedFile('services.rs', script='Services.py', entry_point='services_rs', py2=True)
+GeneratedFile('Services.cpp', script='Services.py', entry_point='services_cpp')
+GeneratedFile('Services.h', script='Services.py', entry_point='services_h')
+GeneratedFile('services.rs', script='Services.py', entry_point='services_rs')
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 DEFINES['_IMPL_NS_STRINGAPI'] = True
 DEFINES['OMNIJAR_NAME'] = CONFIG['OMNIJAR_NAME']
 
--- a/xpcom/ds/moz.build
+++ b/xpcom/ds/moz.build
@@ -130,18 +130,16 @@ UNIFIED_SOURCES += [
     'Tokenizer.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '../io',
 ]
 
 GeneratedFile('nsGkAtomList.h', script='StaticAtoms.py',
-              py2=True,
               entry_point='generate_nsgkatomlist_h',
               inputs=['Atom.py', 'HTMLAtoms.py'])
 
 GeneratedFile('nsGkAtomConsts.h', script='StaticAtoms.py',
-              py2=True,
               entry_point='generate_nsgkatomconsts_h',
               inputs=['Atom.py', 'HTMLAtoms.py'])
 
 FINAL_LIBRARY = 'xul'
--- a/xpcom/idl-parser/xpidl/moz.build
+++ b/xpcom/idl-parser/xpidl/moz.build
@@ -4,10 +4,9 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 PYTHON_UNITTEST_MANIFESTS += [
     'python.ini',
 ]
 
 GeneratedFile('xpidl.stub', 'xpidllex.py', 'xpidlyacc.py', script='header.py',
-              py2=True,
               entry_point='main')
--- a/xpcom/reflect/xptcall/md/win32/moz.build
+++ b/xpcom/reflect/xptcall/md/win32/moz.build
@@ -45,17 +45,16 @@ elif CONFIG['CPU_ARCH'] == 'aarch64':
         'xptcstubs_asm_aarch64.asm',
     ]
 
     # make gets confused if the srcdir and objdir files have the same name, so
     # we generate different names for the objdir files
     for src in asm_files:
         obj = src.replace('_asm_aarch64', '')
         GeneratedFile(obj, script='preprocess.py', entry_point='preprocess',
-                      py2=True,
                       inputs=[src])
         SOURCES += ['!%s' % obj]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../..',
 ]
--- a/xpcom/tests/gtest/moz.build
+++ b/xpcom/tests/gtest/moz.build
@@ -114,17 +114,16 @@ SOURCES += [
 ]
 
 LOCAL_INCLUDES += [
     '../../base',
 ]
 
 GeneratedFile('dafsa_test_1.inc',
               script='../../ds/tools/make_dafsa.py',
-              py2=True,
               inputs=['dafsa_test_1.dat'])
 
 TEST_HARNESS_FILES.gtest += [
     'wikipedia/ar.txt',
     'wikipedia/de-edit.txt',
     'wikipedia/de.txt',
     'wikipedia/ja.txt',
     'wikipedia/ko.txt',