зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1559975: Fix python2/3 compat in gfx/ r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35337 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
e6a44ee1a1
Коммит
a0d3d64841
|
@ -1,4 +1,5 @@
|
|||
#! /usr/bin/env python3
|
||||
from __future__ import print_function
|
||||
assert __name__ == '__main__'
|
||||
|
||||
'''
|
||||
|
@ -84,7 +85,7 @@ GN_ENV['DEPOT_TOOLS_WIN_TOOLCHAIN'] = '0'
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
def run_checked(*args, **kwargs):
|
||||
print(' ', args)
|
||||
print((' ', args))
|
||||
sys.stdout.flush()
|
||||
return subprocess.run(args, check=True, **kwargs)
|
||||
|
||||
|
@ -293,7 +294,7 @@ def gather_libraries(roots: Sequence[str], descs: dict) -> Set[str]:
|
|||
libraries = set()
|
||||
def fn(target_name):
|
||||
cur = descs[target_name]
|
||||
print(' ' + cur['type'], target_name)
|
||||
print((' ' + cur['type'], target_name))
|
||||
assert has_all_includes(target_name, descs), target_name
|
||||
|
||||
if cur['type'] in ('shared_library', 'static_library'):
|
||||
|
@ -308,7 +309,7 @@ def gather_libraries(roots: Sequence[str], descs: dict) -> Set[str]:
|
|||
libraries = gather_libraries(ROOTS, descs)
|
||||
print(f'\n{len(libraries)} libraries:')
|
||||
for k in libraries:
|
||||
print(' ', k)
|
||||
print((' ', k))
|
||||
|
||||
if CHECK_ONLY:
|
||||
print('\n--check complete.')
|
||||
|
@ -570,7 +571,7 @@ def export_target(target_name) -> Set[str]:
|
|||
# Write it out
|
||||
|
||||
mozbuild = target_dir / 'moz.build'
|
||||
print(' ', ' ', f'Writing {mozbuild}')
|
||||
print((' ', ' ', f'Writing {mozbuild}'))
|
||||
data = b'\n'.join((x.encode() for x in lines))
|
||||
mozbuild.write_bytes(data)
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#! /usr/bin/env python3
|
||||
from __future__ import print_function
|
||||
assert __name__ != '__main__'
|
||||
|
||||
'''
|
||||
|
@ -16,12 +17,12 @@ import sys
|
|||
# --
|
||||
|
||||
def print_now(*args):
|
||||
print(*args)
|
||||
print((*args))
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
def run_checked(*args, **kwargs):
|
||||
print(' ', args)
|
||||
print((' ', args))
|
||||
sys.stdout.flush()
|
||||
return subprocess.run(args, check=True, **kwargs)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
################################################################################
|
||||
|
||||
# includes
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
import os
|
||||
import sys
|
||||
import xml.etree.ElementTree
|
||||
|
|
|
@ -245,7 +245,7 @@ print ("}")
|
|||
print ()
|
||||
print ("#undef _")
|
||||
for i in range (2):
|
||||
print
|
||||
print()
|
||||
vv = sorted (values[i].keys ())
|
||||
for v in vv:
|
||||
print ("#undef %s_%s" %
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# 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/.
|
||||
from __future__ import absolute_import
|
||||
import argparse
|
||||
import codecs
|
||||
import locale
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
import locale
|
||||
import subprocess
|
||||
from collections import defaultdict
|
||||
|
@ -428,7 +429,7 @@ def write_mozbuild(sources):
|
|||
|
||||
f.close()
|
||||
|
||||
print 'Wrote ' + filename
|
||||
print('Wrote ' + filename)
|
||||
|
||||
def main():
|
||||
platform_sources = generate_platform_sources()
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
# 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/.
|
||||
|
||||
from __future__ import absolute_import, print_function
|
||||
import platform
|
||||
from unittest import skipIf
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# 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/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import os.path
|
||||
import re
|
||||
import sys
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# 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/.
|
||||
|
||||
from __future__ import print_function
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
from __future__ import print_function
|
||||
import contextlib
|
||||
import os
|
||||
import subprocess
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
from __future__ import print_function
|
||||
import subprocess
|
||||
|
||||
with open('reftest.log', "w") as out:
|
||||
|
|
Загрузка…
Ссылка в новой задаче