summaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/python.py
diff options
context:
space:
mode:
authorCharles Brunet <charles.brunet@optelgroup.com>2023-04-19 07:56:42 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-04-23 23:03:25 -0400
commitbda799dff2dc4b5d607f0e822b12ed0e2db38fb7 (patch)
tree56637920cced8b73cf3c7c13174e0b45cb32b570 /mesonbuild/dependencies/python.py
parent01420bf8fc1ee6c1466e2fa4c9805267192dce26 (diff)
downloadmeson-bda799dff2dc4b5d607f0e822b12ed0e2db38fb7.tar.gz
fix python.version() not working in some cases
import('python').find_installation('python').version() causes exception because of a missing initialization, when `find_installation()` receives a name or a path.
Diffstat (limited to 'mesonbuild/dependencies/python.py')
-rw-r--r--mesonbuild/dependencies/python.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
index 14386f96f..b9fbbbbdc 100644
--- a/mesonbuild/dependencies/python.py
+++ b/mesonbuild/dependencies/python.py
@@ -75,6 +75,7 @@ class BasicPythonExternalProgram(ExternalProgram):
self.name = name
self.command = ext_prog.command
self.path = ext_prog.path
+ self.cached_version = None
# We want strong key values, so we always populate this with bogus data.
# Otherwise to make the type checkers happy we'd have to do .get() for