aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2018-04-09 02:15:45 +0200
committerMathieu Duponchelle <mathieu@centricular.com>2018-04-09 15:43:25 +0200
commit33abe0cf5576a094c565560e3e34a6457c14ad5e (patch)
treeee850cc9cf29355f21ee3517218cac4adfae5d21
parentdce770c0a78ae1a99a53d62faae5b52dbbd5cd03 (diff)
downloadmeson-33abe0cf5576a094c565560e3e34a6457c14ad5e.zip
meson-33abe0cf5576a094c565560e3e34a6457c14ad5e.tar.gz
meson-33abe0cf5576a094c565560e3e34a6457c14ad5e.tar.bz2
[fixup]: Rename find to find_installation
-rw-r--r--mesonbuild/modules/python.py8
-rw-r--r--test cases/python/1 extmodule/meson.build2
2 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 4734654..e4f2ce8 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -224,7 +224,7 @@ print (json.dumps(sysconfig.get_paths(scheme='posix_prefix', vars={'base': '', '
'''
-class PythonHolder(ExternalProgramHolder, InterpreterObject):
+class PythonInstallation(ExternalProgramHolder, InterpreterObject):
def __init__(self, interpreter, python):
InterpreterObject.__init__(self)
ExternalProgramHolder.__init__(self, python)
@@ -365,7 +365,7 @@ class PythonHolder(ExternalProgramHolder, InterpreterObject):
class PythonModule(ExtensionModule):
def __init__(self):
super().__init__()
- self.snippets.add('find')
+ self.snippets.add('find_installation')
# https://www.python.org/dev/peps/pep-0397/
def _get_win_pythonpath(self, name_or_path):
@@ -381,7 +381,7 @@ class PythonModule(ExtensionModule):
return None
@permittedSnippetKwargs(['required'])
- def find(self, interpreter, state, args, kwargs):
+ def find_installation(self, interpreter, state, args, kwargs):
required = kwargs.get('required', True)
if not isinstance(required, bool):
raise InvalidArguments('"required" argument must be a boolean.')
@@ -428,7 +428,7 @@ class PythonModule(ExtensionModule):
if not version:
res = ExternalProgramHolder(NonExistingExternalProgram())
else:
- res = PythonHolder(interpreter, python)
+ res = PythonInstallation(interpreter, python)
return res
diff --git a/test cases/python/1 extmodule/meson.build b/test cases/python/1 extmodule/meson.build
index 0e24a70..4798654 100644
--- a/test cases/python/1 extmodule/meson.build
+++ b/test cases/python/1 extmodule/meson.build
@@ -3,7 +3,7 @@ project('Python extension module', 'c',
py_mod = import('python')
-py = py_mod.find(get_option('python'), required : false)
+py = py_mod.find_installation(get_option('python'), required : false)
if py.found()
py_dep = py.dependency()