aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-11-13 11:15:46 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-11-13 11:15:46 +0200
commit09046a8242109fe9022b1b2655528ad8d0510250 (patch)
tree86732f9bedb7d3fc0901cef675845ae28092f8a4
parent8992729adee7b6ad775513f1f93e638ebb1e1891 (diff)
downloadmeson-fix7975.zip
meson-fix7975.tar.gz
meson-fix7975.tar.bz2
The version kwarg must be a string. Closes #7975.fix7975
-rw-r--r--mesonbuild/interpreter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 104fcce..83df514 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'))