aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-12-10 13:57:41 -0800
committerDylan Baker <dylan@pnwbakers.com>2018-12-12 12:23:37 -0800
commitf6405adc2de0c6cc494b4957df9d796b76195ec4 (patch)
treef98c75fe30fa8119a731ed8aac6eba245281012a /mesonbuild/modules/python.py
parentd536a6f01896ce12d9729f1060f9744753a8e140 (diff)
downloadmeson-f6405adc2de0c6cc494b4957df9d796b76195ec4.zip
meson-f6405adc2de0c6cc494b4957df9d796b76195ec4.tar.gz
meson-f6405adc2de0c6cc494b4957df9d796b76195ec4.tar.bz2
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
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r--mesonbuild/modules/python.py10
1 files changed, 7 insertions, 3 deletions
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):