Bug 948209 - Remove mozbuild.config. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 11 Dec 2013 10:59:02 +0900
changeset 160180 81c1d9d207d38f9edcf85bbc678ce59a499840f3
parent 160179 9bfeef8ce230c75d8417e4cda864ff858d3b90ba
child 160181 fb0fa2c213924b02ce3f48d76bea8ffdf68ac557
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersgps
bugs948209
milestone29.0a1
Bug 948209 - Remove mozbuild.config. r=gps
build/mach_bootstrap.py
python/mozbuild/mozbuild/base.py
python/mozbuild/mozbuild/config.py
--- a/build/mach_bootstrap.py
+++ b/build/mach_bootstrap.py
@@ -62,17 +62,16 @@ SEARCH_PATHS = [
 # Individual files providing mach commands.
 MACH_MODULES = [
     'addon-sdk/mach_commands.py',
     'dom/bindings/mach_commands.py',
     'layout/tools/reftest/mach_commands.py',
     'python/mach_commands.py',
     'python/mach/mach/commands/commandinfo.py',
     'python/mozboot/mozboot/mach_commands.py',
-    'python/mozbuild/mozbuild/config.py',
     'python/mozbuild/mozbuild/mach_commands.py',
     'python/mozbuild/mozbuild/frontend/mach_commands.py',
     'testing/mach_commands.py',
     'testing/marionette/mach_commands.py',
     'testing/mochitest/mach_commands.py',
     'testing/xpcshell/mach_commands.py',
     'testing/talos/mach_commands.py',
     'testing/xpcshell/mach_commands.py',
--- a/python/mozbuild/mozbuild/base.py
+++ b/python/mozbuild/mozbuild/base.py
@@ -14,17 +14,16 @@ import sys
 import which
 
 from mach.mixin.logging import LoggingMixin
 from mach.mixin.process import ProcessExecutionMixin
 
 from mozfile.mozfile import rmtree
 
 from .backend.configenvironment import ConfigEnvironment
-from .config import BuildConfig
 from .mozconfig import (
     MozconfigFindException,
     MozconfigLoadException,
     MozconfigLoader,
 )
 from .virtualenv import VirtualenvManager
 
 
@@ -73,17 +72,16 @@ class MozbuildObject(ProcessExecutionMix
         """Create a new Mozbuild object instance.
 
         Instances are bound to a source directory, a ConfigSettings instance,
         and a LogManager instance. The topobjdir may be passed in as well. If
         it isn't, it will be calculated from the active mozconfig.
         """
         self.topsrcdir = topsrcdir
         self.settings = settings
-        self.config = BuildConfig(settings)
 
         self.populate_logger()
         self.log_manager = log_manager
 
         self._make = None
         self._topobjdir = topobjdir
         self._mozconfig = None
         self._config_guess_output = None
deleted file mode 100644
--- a/python/mozbuild/mozbuild/config.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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 unicode_literals
-
-import multiprocessing
-
-from mach.config import (
-    ConfigProvider,
-    PositiveIntegerType,
-)
-
-from mach.decorators import SettingsProvider
-
-
-@SettingsProvider
-class BuildConfig(ConfigProvider):
-    """The configuration for mozbuild."""
-
-    def __init__(self, settings):
-        self.settings = settings
-
-    @classmethod
-    def _register_settings(cls):
-        def register(section, option, type_cls, **kwargs):
-            cls.register_setting(section, option, type_cls, domain='mozbuild',
-                **kwargs)
-
-        register('build', 'threads', PositiveIntegerType,
-            default=multiprocessing.cpu_count())
-
-