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/.
6 from mozbuild
.base
import MozbuildObject
7 from mozbuild
.backend
.configenvironment
import PartialConfigEnvironment
9 config
= MozbuildObject
.from_environment()
10 partial_config
= PartialConfigEnvironment(config
.topobjdir
)
12 for var
in ("topsrcdir", "topobjdir"):
13 value
= getattr(config
, var
)
14 setattr(sys
.modules
[__name__
], var
, value
)
16 for var
in ("defines", "substs", "get_dependencies"):
17 value
= getattr(partial_config
, var
)
18 setattr(sys
.modules
[__name__
], var
, value
)