Bug 799648 - Part 3: Move config module from mozbuild to mach; r=jhammel
authorGregory Szorc <gps@mozilla.com>
Wed, 10 Oct 2012 11:08:10 -0700
changeset 109795 0ccb7a8a8e5b09e98b589642fe45255996614ec5
parent 109794 66d59a4d5a1b76ff43dd4fe6c474e05574a60578
child 109796 c0977caba1d634ef3725dc024d7e6be03628ffbc
push id23654
push usergszorc@mozilla.com
push dateWed, 10 Oct 2012 18:09:39 +0000
treeherdermozilla-central@c0977caba1d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjhammel
bugs799648
milestone19.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 799648 - Part 3: Move config module from mozbuild to mach; r=jhammel
python/mach/mach/config.py
python/mach/mach/main.py
python/mach/mach/test/test_config.py
python/mozbuild/mozbuild/base.py
python/mozbuild/mozbuild/config.py
python/mozbuild/mozbuild/test/test_config.py
rename from python/mozbuild/mozbuild/config.py
rename to python/mach/mach/config.py
--- a/python/mach/mach/main.py
+++ b/python/mach/mach/main.py
@@ -13,24 +13,24 @@ import imp
 import logging
 import os
 import sys
 import traceback
 import uuid
 import sys
 
 from mozbuild.base import BuildConfig
-from mozbuild.config import ConfigSettings
 
 from .base import (
     CommandArgument,
     CommandProvider,
     Command,
 )
 
+from .config import ConfigSettings
 from .logging import LoggingManager
 
 from .registrar import populate_argument_parser
 
 
 # Classes inheriting from ConfigProvider that provide settings.
 # TODO this should come from auto-discovery somehow.
 SETTINGS_PROVIDERS = [
rename from python/mozbuild/mozbuild/test/test_config.py
rename to python/mach/mach/test/test_config.py
--- a/python/mozbuild/mozbuild/test/test_config.py
+++ b/python/mach/mach/test/test_config.py
@@ -1,27 +1,30 @@
 # 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/.  
+# You can obtain one at http://mozilla.org/MPL/2.0/.
 from __future__ import unicode_literals
 
 import sys
 import unittest
 
 from tempfile import NamedTemporaryFile
 
-from mozbuild.config import AbsolutePathType
-from mozbuild.config import BooleanType
-from mozbuild.config import ConfigProvider
-from mozbuild.config import ConfigSettings
-from mozbuild.config import IntegerType
-from mozbuild.config import PathType
-from mozbuild.config import PositiveIntegerType
-from mozbuild.config import RelativePathType
-from mozbuild.config import StringType
+from mach.config import (
+    AbsolutePathType,
+    BooleanType,
+    ConfigProvider,
+    ConfigSettings,
+    IntegerType,
+    PathType,
+    PositiveIntegerType,
+    RelativePathType,
+    StringType,
+)
+
 
 if sys.version_info[0] == 3:
     str_type = str
 else:
     str_type = basestring
 
 CONFIG1 = r"""
 [foo]
--- a/python/mozbuild/mozbuild/base.py
+++ b/python/mozbuild/mozbuild/base.py
@@ -9,22 +9,24 @@ import multiprocessing
 import os
 import pymake.parser
 import subprocess
 import sys
 import which
 
 from pymake.data import Makefile
 
+from mach.config import (
+    ConfigProvider,
+    PositiveIntegerType,
+)
+
 from mach.mixin.logging import LoggingMixin
 from mach.mixin.process import ProcessExecutionMixin
 
-from mozbuild.config import ConfigProvider
-from mozbuild.config import PositiveIntegerType
-
 
 class MozbuildObject(ProcessExecutionMixin):
     """Base class providing basic functionality useful to many modules.
 
     Modules in this package typically require common functionality such as
     accessing the current config, getting the location of the source directory,
     running processes, etc. This classes provides that functionality. Other
     modules can inherit from this class to obtain this functionality easily.