From f6405adc2de0c6cc494b4957df9d796b76195ec4 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 10 Dec 2018 13:57:41 -0800 Subject: modules/python: Add path method This would normally be exposed by the ExternalProgramHolder, but wasn't due to the implementation of the PythonInstallation module. Because of that I've duplicated the method so that we can add the FeatureNew decorator. Fixes #4070 --- mesonbuild/modules/python.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mesonbuild/modules/python.py') diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index e408a71..c51b412 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -311,11 +311,9 @@ class PythonInstallation(ExternalProgramHolder): 'get_path': self.get_path_method, 'has_variable': self.has_variable_method, 'get_variable': self.get_variable_method, + 'path': self.path_method, }) - # Remove this so that an API change is not part of a refactor - del self.methods['path_method'] - @permittedKwargs(mod_kwargs) def extension_module_method(self, args, kwargs): if 'subdir' in kwargs and 'install_dir' in kwargs: @@ -452,6 +450,12 @@ class PythonInstallation(ExternalProgramHolder): return self.interpreter.module_method_callback(ModuleReturnValue(var, [])) + @noPosargs + @noKwargs + @FeatureNew('Python module path method', '0.50.0') + def path_method(self, args, kwargs): + return super().path_method(args, kwargs) + class PythonModule(ExtensionModule): -- cgit v1.1