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/.
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
)