diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-01-12 10:50:22 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-01-13 13:32:48 -0800 |
commit | 022632c91b255739c5100601a02b197cb29cd23e (patch) | |
tree | 1b624726c0f5d801f7588e054a34bf70c4f8b8cb /mesonbuild/modules | |
parent | 6180992d4939f931aaeae74138dae069a60a3485 (diff) | |
download | meson-022632c91b255739c5100601a02b197cb29cd23e.zip meson-022632c91b255739c5100601a02b197cb29cd23e.tar.gz meson-022632c91b255739c5100601a02b197cb29cd23e.tar.bz2 |
build/interperter: Add annotations and move input validation to interpreter
This moves the user input validation to the interpreter, instead of
being in the build module, and adds type annotations.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r-- | mesonbuild/modules/cmake.py | 4 | ||||
-rw-r--r-- | mesonbuild/modules/gnome.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/pkgconfig.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py index f6afaf3..ef53d9f 100644 --- a/mesonbuild/modules/cmake.py +++ b/mesonbuild/modules/cmake.py @@ -285,7 +285,7 @@ class CmakeModule(ExtensionModule): } mesonlib.do_conf_file(template_file, version_file, conf, 'meson') - res = build.Data(mesonlib.File(True, state.environment.get_scratch_dir(), version_file), pkgroot) + res = build.Data([mesonlib.File(True, state.environment.get_scratch_dir(), version_file)], pkgroot) return ModuleReturnValue(res, [res]) def create_package_file(self, infile, outfile, PACKAGE_RELATIVE_PATH, extra, confdata): @@ -370,7 +370,7 @@ class CmakeModule(ExtensionModule): if conffile not in interpreter.build_def_files: interpreter.build_def_files.append(conffile) - res = build.Data(mesonlib.File(True, ofile_path, ofile_fname), install_dir) + res = build.Data([mesonlib.File(True, ofile_path, ofile_fname)], install_dir) interpreter.build.data.append(res) return res diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 21570bd..5cad9f5 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1629,7 +1629,7 @@ G_END_DECLS''' with open(fname, 'w') as ofile: for package in packages: ofile.write(package + '\n') - return build.Data(mesonlib.File(True, outdir, fname), install_dir) + return build.Data([mesonlib.File(True, outdir, fname)], install_dir) def _get_vapi_link_with(self, target): link_with = [] diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index 7d347a6..db589a3 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -539,7 +539,7 @@ class PkgConfigModule(ExtensionModule): self.generate_pkgconfig_file(state, deps, subdirs, name, description, url, version, pcfile, conflicts, variables, False, dataonly) - res = build.Data(mesonlib.File(True, state.environment.get_scratch_dir(), pcfile), pkgroot) + res = build.Data([mesonlib.File(True, state.environment.get_scratch_dir(), pcfile)], pkgroot) variables = self.interpreter.extract_variables(kwargs, argname='uninstalled_variables', dict_new=True) variables = parse_variable_list(variables) |