Bug 1176642 - Use absolute_import in mozbuild; r=glandium

This commit is contained in:
Gregory Szorc 2015-06-21 18:37:18 -07:00
parent e5bf4a021d
commit b531585d04
48 changed files with 68 additions and 33 deletions

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
from collections import OrderedDict
from itertools import groupby

View File

@ -7,7 +7,7 @@ if the entry does not already exist.
Usage: buildlist.py <filename> <entry> [<entry> ...]
'''
from __future__ import print_function
from __future__ import absolute_import, print_function
import sys
import os

View File

@ -2,6 +2,8 @@
# 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 ctypes
import os
import sys

View File

@ -5,6 +5,8 @@
# Convert Windows-style export files into a single Unix-style linker
# script, applying any necessary preprocessing.
from __future__ import absolute_import
import itertools
import re
import sys

View File

@ -6,7 +6,8 @@
# the arguments that can be used to generate the output file, call the
# script's |main| method with appropriate arguments.
from __future__ import print_function
from __future__ import absolute_import, print_function
import argparse
import imp
import os

View File

@ -31,6 +31,7 @@ e.g. raw/browsersearch.json, raw-pt-rBR/browsersearch.json.
'''
from __future__ import (
absolute_import,
print_function,
unicode_literals,
)

View File

@ -25,7 +25,7 @@ write the result to suggestedsites.json on the locale-specific raw resource
directory e.g. raw/suggestedsites.json, raw-pt-rBR/suggestedsites.json.
'''
from __future__ import print_function
from __future__ import absolute_import, print_function
import argparse
import json

View File

@ -2,6 +2,8 @@
# 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 sys
import mozbuild.jar

View File

@ -8,7 +8,7 @@ Gecko library binaries. The AAR file is intended for use by local
developers using Gradle.
'''
from __future__ import print_function
from __future__ import absolute_import, print_function
import argparse
import hashlib

View File

@ -2,6 +2,8 @@
# 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 sys
from mozbuild.preprocessor import Preprocessor

View File

@ -2,7 +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, unicode_literals
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import sys

View File

@ -2,6 +2,8 @@
# 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 sys
from mozwebidlcodegen import BuildSystemWebIDL

View File

@ -2,12 +2,14 @@
# 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/.
'''A generic script to verify all test files are in the
'''A generic script to verify all test files are in the
corresponding .ini file.
Usage: xpccheck.py <directory> [<directory> ...]
'''
from __future__ import absolute_import
import sys
import os
from glob import glob

View File

@ -7,6 +7,8 @@
# input IDL file(s). It's purpose is to directly support the build
# system. The API will change to meet the needs of the build system.
from __future__ import absolute_import
import argparse
import os
import sys

View File

@ -5,6 +5,8 @@
# This script creates a zip file, but will also strip any binaries
# it finds before adding them to the zip.
from __future__ import absolute_import
from mozpack.files import FileFinder
from mozpack.copier import Jarrer
from mozpack.errors import errors

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
import itertools
import os

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
from abc import (
ABCMeta,

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
import itertools
import json

View File

@ -2,6 +2,8 @@
# 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
import sys

View File

@ -2,6 +2,8 @@
# 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 errno
import random
import os

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
import logging
import os

View File

@ -5,7 +5,7 @@
# This file contains a build backend for generating Visual Studio project
# files.
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import errno
import os

View File

@ -2,7 +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, unicode_literals
from __future__ import absolute_import, print_function, unicode_literals
import json
import logging

View File

@ -2,7 +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
from __future__ import absolute_import, print_function
import argparse
import sys

View File

@ -4,7 +4,7 @@
# This modules provides functionality for dealing with compiler warnings.
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import errno
import json

View File

@ -6,7 +6,7 @@
# drop-in replacement for autoconf 2.13's config.status, with features
# borrowed from autoconf > 2.5, and additional features.
from __future__ import print_function
from __future__ import absolute_import, print_function
import logging
import os

View File

@ -6,6 +6,8 @@
# to a given compilation unit. This is used as a helper to find a bug in some
# versions of GNU ld.
from __future__ import absolute_import
import subprocess
import sys
import re

View File

@ -13,6 +13,8 @@
# will be used from shell, we just print the two assignments and evaluate
# them from shell.
from __future__ import absolute_import
import os
import subprocess
import re

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
import getpass
import json

View File

@ -2,7 +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
from __future__ import absolute_import, print_function
r'''This module contains code for managing clobbering of the tree.'''

View File

@ -2,6 +2,8 @@
# 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
import subprocess
import sys

View File

@ -5,8 +5,7 @@
# This file contains utility functions for reading .properties files, like
# region.properties.
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import codecs
import re

View File

@ -14,7 +14,7 @@ If you are looking for the absolute authority on what moz.build files can
contain, you've come to the right place.
"""
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import os

View File

@ -15,7 +15,7 @@ contains the code for converting executed mozbuild files into these data
structures.
"""
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from mozbuild.util import (
shell_quote,

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
import itertools
import logging

View File

@ -2,12 +2,12 @@
# 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 unicode_literals
from __future__ import absolute_import, unicode_literals
import gyp
import sys
import time
import os
from itertools import chain
import mozpack.path as mozpath
from mozpack.files import FileFinder
from .sandbox import alphabetical_sorted

View File

@ -16,7 +16,7 @@ The BuildReader contains basic logic for traversing a tree of mozbuild files.
It does this by examining specific variables populated during execution.
"""
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, print_function, unicode_literals
import ast
import inspect

View File

@ -17,7 +17,7 @@ KeyError are machine parseable. This machine-friendly data is used to present
user-friendly error messages in the case of errors.
"""
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import os
import sys

View File

@ -4,7 +4,7 @@
# This module contains code for running an HTTP server to view build info.
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import BaseHTTPServer
import json

View File

@ -8,6 +8,8 @@ processing jar.mn files.
See the documentation for jar.mn on MDC for further details on the format.
'''
from __future__ import absolute_import
import sys
import os
import errno

View File

@ -2,6 +2,8 @@
# 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
import re
from types import StringTypes

View File

@ -2,7 +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, unicode_literals
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import os

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
import filecmp
import os

View File

@ -5,6 +5,8 @@
# This module produces a JSON file that provides basic build info and
# configuration metadata.
from __future__ import absolute_import
import os
import re
import json

View File

@ -2,6 +2,8 @@
# 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
import sys

View File

@ -2,7 +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 unicode_literals
from __future__ import absolute_import, unicode_literals
import json
import os

View File

@ -5,7 +5,7 @@
# This file contains miscellaneous utility functions that don't belong anywhere
# in particular.
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import collections
import difflib

View File

@ -5,7 +5,7 @@
# This file contains code for populating the virtualenv environment for
# Mozilla's build system. It is typically called as part of configure.
from __future__ import print_function, unicode_literals
from __future__ import absolute_import, print_function, unicode_literals
import distutils.sysconfig
import os