From d4cd0ceb9d4efcd0f376db3e10405a7160fd5c41 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 13 Nov 2020 11:15:46 +0200 Subject: [PATCH] The version kwarg must be a string. Closes #7975. --- mesonbuild/interpreter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 104fcce6f..83df514d6 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3175,6 +3175,8 @@ external dependencies (including libraries) must go to "dependencies".''') self.build.project_name = proj_name self.active_projectname = proj_name self.project_version = kwargs.get('version', 'undefined') + if not isinstance(self.project_version, str): + raise InvalidCode('The version keyword argument must be a string.') if self.build.project_version is None: self.build.project_version = self.project_version proj_license = mesonlib.stringlistify(kwargs.get('license', 'unknown'))