diff options
author | Alexey Stukalov <astukalov@gmail.com> | 2018-01-03 14:52:50 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-02-19 01:32:16 +0530 |
commit | 5d1f8a6e87fa07ebe811025b32110d3ce9f2b896 (patch) | |
tree | 7024fd8bbd2f556bf2f3e0aa6f980b9bde104774 | |
parent | 9cb86eae12cf6babdcb6c49a9fed3f9dc2d76972 (diff) | |
download | meson-5d1f8a6e87fa07ebe811025b32110d3ce9f2b896.zip meson-5d1f8a6e87fa07ebe811025b32110d3ce9f2b896.tar.gz meson-5d1f8a6e87fa07ebe811025b32110d3ce9f2b896.tar.bz2 |
normpath to bundled meson executable
add comments clarifying when the 1st method of finding meson.py may fail
-rw-r--r-- | mesonbuild/mesonlib.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 53576bc..076d688 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -51,9 +51,13 @@ def detect_meson_py_location(): if os.path.exists(m_path): return m_path + # No meson found, which means that either: + # a) meson is not installed + # b) meson is installed to a non-standard location + # c) the script that invoked mesonlib is not the one of meson tools (e.g. run_unittests.py) # The only thing remaining is to try to find the bundled executable and # pray distro packagers have not moved it. - fname = os.path.join(os.path.dirname(__file__), '..', 'meson.py') + fname = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', 'meson.py')) if not os.path.exists(fname): raise RuntimeError('Could not determine how to run Meson. Please file a bug with details.') return fname |