summaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/__init__.py6
-rw-r--r--mesonbuild/modules/gnome.py5
2 files changed, 6 insertions, 5 deletions
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
index 3b7c29942..98ac18aee 100644
--- a/mesonbuild/modules/__init__.py
+++ b/mesonbuild/modules/__init__.py
@@ -31,7 +31,7 @@ if T.TYPE_CHECKING:
from ..interpreterbase import TYPE_var, TYPE_kwargs
from ..programs import OverrideProgram
from ..wrap import WrapMode
- from ..build import EnvironmentVariables, Executable
+ from ..build import Executable
from ..dependencies import Dependency
class ModuleState:
@@ -219,8 +219,8 @@ class NewExtensionModule(ModuleObject):
def found() -> bool:
return True
- def get_devenv(self) -> T.Optional['EnvironmentVariables']:
- return None
+ def postconf_hook(self, b: build.Build) -> None:
+ pass
# FIXME: Port all modules to stop using self.interpreter and use API on
# ModuleState instead. Modules should stop using this class and instead use
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 7d471e4ce..3b856227e 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -784,8 +784,9 @@ class GnomeModule(ExtensionModule):
self.devenv = build.EnvironmentVariables()
self.devenv.prepend(varname, [value])
- def get_devenv(self) -> T.Optional[build.EnvironmentVariables]:
- return self.devenv
+ def postconf_hook(self, b: build.Build) -> None:
+ if self.devenv is not None:
+ b.devenv.append(self.devenv)
def _get_gir_dep(self, state: 'ModuleState') -> T.Tuple[Dependency, T.Union[build.Executable, 'ExternalProgram', 'OverrideProgram'],
T.Union[build.Executable, 'ExternalProgram', 'OverrideProgram']]: