modules/python: make some internal helpers protected

pull/8992/head
Dylan Baker 3 years ago
parent 20399a3e04
commit d6e606166e
  1. 8
      mesonbuild/modules/python.py

@ -123,7 +123,7 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
self.compile_args += ['-I' + path for path in inc_paths if path] self.compile_args += ['-I' + path for path in inc_paths if path]
def get_windows_python_arch(self) -> T.Optional[str]: def _get_windows_python_arch(self) -> T.Optional[str]:
if self.platform == 'mingw': if self.platform == 'mingw':
pycc = self.variables.get('CC') pycc = self.variables.get('CC')
if pycc.startswith('x86_64'): if pycc.startswith('x86_64'):
@ -141,7 +141,7 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
mlog.log(f'Unknown Windows Python platform {self.platform!r}') mlog.log(f'Unknown Windows Python platform {self.platform!r}')
return None return None
def get_windows_link_args(self) -> T.Optional[T.List[str]]: def _get_windows_link_args(self) -> T.Optional[T.List[str]]:
if self.platform.startswith('win'): if self.platform.startswith('win'):
vernum = self.variables.get('py_version_nodot') vernum = self.variables.get('py_version_nodot')
if self.static: if self.static:
@ -169,7 +169,7 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
Find python3 libraries on Windows and also verify that the arch matches Find python3 libraries on Windows and also verify that the arch matches
what we are building for. what we are building for.
''' '''
pyarch = self.get_windows_python_arch() pyarch = self._get_windows_python_arch()
if pyarch is None: if pyarch is None:
self.is_found = False self.is_found = False
return return
@ -191,7 +191,7 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
self.is_found = False self.is_found = False
return return
# This can fail if the library is not found # This can fail if the library is not found
largs = self.get_windows_link_args() largs = self._get_windows_link_args()
if largs is None: if largs is None:
self.is_found = False self.is_found = False
return return

Loading…
Cancel
Save