aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/mesonmain.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-07-27 15:26:02 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-09-24 10:36:05 -0700
commitd661a0cd96e2453e8e4629c867589657b81239d1 (patch)
treedfe6acbb7a20b0f2a43e334470a311aa8f754122 /mesonbuild/interpreter/mesonmain.py
parent6c5bfd4c241e94f5e0f4dea9ba7fb5d5090a4802 (diff)
downloadmeson-d661a0cd96e2453e8e4629c867589657b81239d1.zip
meson-d661a0cd96e2453e8e4629c867589657b81239d1.tar.gz
meson-d661a0cd96e2453e8e4629c867589657b81239d1.tar.bz2
build: use an object rather than a dict for the dep_manifest
This really is more of a struct than a dict, as the types are disjoint and they are internally handled, (ie, not from user input). This cleans some things up, in addition I spotted a bug in the ModuleState where the dict with the version and license is passed to a field that expects just the version string.
Diffstat (limited to 'mesonbuild/interpreter/mesonmain.py')
-rw-r--r--mesonbuild/interpreter/mesonmain.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/interpreter/mesonmain.py b/mesonbuild/interpreter/mesonmain.py
index 144029c..8c62f87 100644
--- a/mesonbuild/interpreter/mesonmain.py
+++ b/mesonbuild/interpreter/mesonmain.py
@@ -384,14 +384,14 @@ class MesonMain(MesonInterpreterObject):
@noPosargs
@noKwargs
- def project_version_method(self, args: T.List['TYPE_var'], kwargs: 'TYPE_kwargs') -> str:
- return self.build.dep_manifest[self.interpreter.active_projectname]['version']
+ def project_version_method(self, args: T.List['TYPE_var'], kwargs: 'TYPE_kwargs') -> T.List[str]:
+ return self.build.dep_manifest[self.interpreter.active_projectname].version
@FeatureNew('meson.project_license()', '0.45.0')
@noPosargs
@noKwargs
def project_license_method(self, args: T.List['TYPE_var'], kwargs: 'TYPE_kwargs') -> str:
- return self.build.dep_manifest[self.interpreter.active_projectname]['license']
+ return self.build.dep_manifest[self.interpreter.active_projectname].license
@noPosargs
@noKwargs