aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-03-15 21:51:16 -0400
committerXavier Claessens <xclaesse@gmail.com>2022-03-16 07:03:43 -0400
commit54213683e2d97c1b553282d4e0483387b4e7679f (patch)
tree80e3dd2fd4ae04154ec951647172283adb47c774
parent1be444b4647214dbd9a43084ffbf01ef95a78287 (diff)
downloadmeson-54213683e2d97c1b553282d4e0483387b4e7679f.zip
meson-54213683e2d97c1b553282d4e0483387b4e7679f.tar.gz
meson-54213683e2d97c1b553282d4e0483387b4e7679f.tar.bz2
python: Remove warning about invalid install path
It was originally added because proper detection was not working on Debian, but that has been fixed since. It was causing annoying warning by default when prefix is /usr/local that can only be avoided by setting options.
-rw-r--r--mesonbuild/modules/python.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 70ae3c1..3bbccd1 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -364,7 +364,6 @@ print(json.dumps({
'paths': paths,
'sysconfig_paths': sysconfig.get_paths(),
'install_paths': install_paths,
- 'sys_paths': sys.path,
'version': sysconfig.get_python_version(),
'platform': sysconfig.get_platform(),
'is_pypy': '__pypy__' in sys.builtin_module_names,
@@ -454,14 +453,6 @@ class PythonExternalProgram(ExternalProgram):
# inside a venv, deb_system is *never* active hence info['paths'] may be wrong
rel_path = self.info['sysconfig_paths'][key]
- # Use python's path relative to prefix, and warn if that's not a location
- # python will lookup for modules.
- abs_path = Path(state.get_option('prefix'), rel_path)
- sys_paths = [Path(i) for i in self.info['sys_paths']]
- if abs_path not in sys_paths:
- mlog.warning('Python files installed by Meson might not be found by python interpreter.\n',
- f'This warning can be avoided by setting "python.{key}dir" option.',
- once=True)
return rel_path