diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-17 20:51:34 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-06 21:34:15 +0300 |
commit | 534c95cc3eae86bb8e08bee5f5162ca65bc53461 (patch) | |
tree | 11580b9cbab6b8b7657f6745adc7d01e452e3e9f | |
parent | 8a4aceef43a3c9c167b375cf9b701ea888bdff14 (diff) | |
download | meson-534c95cc3eae86bb8e08bee5f5162ca65bc53461.zip meson-534c95cc3eae86bb8e08bee5f5162ca65bc53461.tar.gz meson-534c95cc3eae86bb8e08bee5f5162ca65bc53461.tar.bz2 |
Made set_option kwargs named-only.
-rw-r--r-- | mesonbuild/coredata.py | 4 | ||||
-rwxr-xr-x | run_unittests.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 048a29c..2d3d5ab 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -635,7 +635,7 @@ class CoreData: if type(oldval) != type(value): self.user_options[name] = value - def set_options(self, options, subproject='', warn_unknown=True): + def set_options(self, options, *, subproject='', warn_unknown=True): # Set prefix first because it's needed to sanitize other options prefix = self.builtins['prefix'].value if 'prefix' in options: @@ -709,7 +709,7 @@ class CoreData: continue options[k] = v - self.set_options(options, subproject) + self.set_options(options, subproject=subproject) def process_new_compiler(self, lang: str, comp, env): from . import compilers diff --git a/run_unittests.py b/run_unittests.py index 0116827..8212c46 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -5151,7 +5151,7 @@ endian = 'little' self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'librelativepath.pc'))) env = get_fake_env(testdir, self.builddir, self.prefix) - env.coredata.set_options({'pkg_config_path': pkg_dir}, '') + env.coredata.set_options({'pkg_config_path': pkg_dir}, subproject='') kwargs = {'required': True, 'silent': True} relative_path_dep = PkgConfigDependency('librelativepath', env, kwargs) self.assertTrue(relative_path_dep.found()) |