Bug 1882714 [wpt PR 44850] - Update wpt metadata, a=testonly
[gecko.git] / build / buildconfig.py
blob527690c2b0e864a39693b09c230b052e7d9e3f2f
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 import sys
7 from mozbuild.backend.configenvironment import PartialConfigEnvironment
8 from mozbuild.base import MozbuildObject
10 config = MozbuildObject.from_environment()
11 partial_config = PartialConfigEnvironment(config.topobjdir)
13 for var in ("topsrcdir", "topobjdir"):
14 value = getattr(config, var)
15 setattr(sys.modules[__name__], var, value)
17 for var in ("defines", "substs", "get_dependencies"):
18 value = getattr(partial_config, var)
19 setattr(sys.modules[__name__], var, value)