summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Stukalov <astukalov@gmail.com>2018-01-03 14:52:50 +0100
committerAlexey Stukalov <astukalov@gmail.com>2018-01-03 14:58:30 +0100
commitda44a93daa6ee0613122e85790e3c9f6c39abe8c (patch)
tree543e090c924efef35138d7726fda981581903ddf
parent8fc424418720da4ef61bde9348f4cc1a149d1cb2 (diff)
downloadmeson-da44a93daa6ee0613122e85790e3c9f6c39abe8c.tar.gz
normpath to bundled meson executable
add comments clarifying when the 1st method of finding meson.py may fail
-rw-r--r--mesonbuild/mesonlib.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index 2aecee8e3..d5099578d 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -52,9 +52,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