aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-06-14 15:36:16 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-06-22 09:12:54 -0700
commita024f432dd1cd406fa80334f63e91939536d3f79 (patch)
tree85768f9f1a87ff8d23cfc080cc22a666b6d399ac
parentf276b2349a604ee84ea06ada55ae69e9ac4db4b2 (diff)
downloadmeson-a024f432dd1cd406fa80334f63e91939536d3f79.zip
meson-a024f432dd1cd406fa80334f63e91939536d3f79.tar.gz
meson-a024f432dd1cd406fa80334f63e91939536d3f79.tar.bz2
interpreter: add overload for source_strings_to_files
when only passing strings or Files we only get back Files. This is useful for the install_* methods
-rw-r--r--mesonbuild/interpreter/interpreter.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index be17c9a..75f55fd 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -2480,6 +2480,10 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey
if project_root / self.subproject_dir in norm.parents:
raise InterpreterException(f'Sandbox violation: Tried to grab {inputtype} {norm.name} from a nested subproject.')
+
+ @T.overload
+ def source_strings_to_files(self, sources: T.List['mesonlib.FileOrString']) -> T.List['mesonlib.File']: ...
+
def source_strings_to_files(self, sources: T.List['SourceInputs']) -> T.List['SourceOutputs']:
"""Lower inputs to a list of Targets and Files, replacing any strings.