summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-03-04 08:14:38 -0800
committerEli Schwartz <eschwartz93@gmail.com>2025-03-10 14:14:25 -0400
commit4fa52925459dac650bf053715987ee7beb3b23c1 (patch)
tree1ac2f3732063ad936eb6ef9dc6009c8c955527af /mesonbuild/modules/python.py
parent43ea11ea49948635b1d672fef1bd397233b65b19 (diff)
downloadmeson-4fa52925459dac650bf053715987ee7beb3b23c1.tar.gz
coredata: replace get_option with optstore.get_value_for
This is an old method, that is now just a wrapper around the OptionStore method, that doesn't add any value. It's also an option related method attached to the CoreData instead of the OptionStore, so useless and a layering violation.
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r--mesonbuild/modules/python.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 1b7a05640..2a7e685c1 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -113,7 +113,7 @@ class PythonInstallation(_ExternalProgramHolder['PythonExternalProgram']):
def __init__(self, python: 'PythonExternalProgram', interpreter: 'Interpreter'):
_ExternalProgramHolder.__init__(self, python, interpreter)
info = python.info
- prefix = self.interpreter.environment.coredata.get_option(OptionKey('prefix'))
+ prefix = self.interpreter.environment.coredata.optstore.get_value_for(OptionKey('prefix'))
assert isinstance(prefix, str), 'for mypy'
self.variables = info['variables']
self.suffix = info['suffix']
@@ -169,7 +169,7 @@ class PythonInstallation(_ExternalProgramHolder['PythonExternalProgram']):
self.current_node)
limited_api_version = kwargs.pop('limited_api')
- allow_limited_api = self.interpreter.environment.coredata.get_option(OptionKey('python.allow_limited_api'))
+ allow_limited_api = self.interpreter.environment.coredata.optstore.get_value_for(OptionKey('python.allow_limited_api'))
if limited_api_version != '' and allow_limited_api:
target_suffix = self.limited_api_suffix
@@ -374,7 +374,7 @@ class PythonModule(ExtensionModule):
def _get_install_scripts(self) -> T.List[mesonlib.ExecutableSerialisation]:
backend = self.interpreter.backend
ret = []
- optlevel = self.interpreter.environment.coredata.get_option(OptionKey('python.bytecompile'))
+ optlevel = self.interpreter.environment.coredata.optstore.get_value_for(OptionKey('python.bytecompile'))
if optlevel == -1:
return ret
if not any(PythonExternalProgram.run_bytecompile.values()):