summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/__init__.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-08-28 19:22:00 -0400
committerXavier Claessens <xclaesse@gmail.com>2025-10-29 17:37:55 +0100
commitf3aaebde4050c1906d69db20fc9fc2eb5c0c4371 (patch)
treec730ed0eb99b86ec83de743940e10762acf18cc9 /mesonbuild/modules/__init__.py
parentdd2ccaa751894b1f7f6dcbd0913a18cc57693feb (diff)
downloadmeson-f3aaebde4050c1906d69db20fc9fc2eb5c0c4371.tar.gz
modules: Fix state.project_name value
It was the name of root project instead of current subproject. This is only used by pkgconfig generator. While at it, simplify the way we get the project version.
Diffstat (limited to 'mesonbuild/modules/__init__.py')
-rw-r--r--mesonbuild/modules/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py
index 87892e6d7..3ff9368d9 100644
--- a/mesonbuild/modules/__init__.py
+++ b/mesonbuild/modules/__init__.py
@@ -41,8 +41,8 @@ class ModuleState:
self.root_subdir = interpreter.root_subdir
self.current_lineno = interpreter.current_node.lineno
self.environment = interpreter.environment
- self.project_name = interpreter.build.project_name
- self.project_version = interpreter.build.dep_manifest[interpreter.active_projectname].version
+ self.project_name = interpreter.active_projectname
+ self.project_version = interpreter.project_version
# The backend object is under-used right now, but we will need it:
# https://github.com/mesonbuild/meson/issues/1419
self.backend = interpreter.backend