Commit 4dd87780 authored by Emmanuele Bassi's avatar Emmanuele Bassi

Drop Meson patch

Was applied upstream.
parent b8419204
......@@ -69,7 +69,7 @@
{"src": "git:git://github.com/mesonbuild/meson.git",
"component": "devel",
"patches": ["python-meson-buildsys.patch", "meson-issue-2672.patch"]},
"patches": ["python-meson-buildsys.patch"]},
{"src": "gnome:glib",
"component": "minimal",
......
From 9aa109b1073e664d54627757daa68d6d2a1e1902 Mon Sep 17 00:00:00 2001
From: Jussi Pakkanen <jpakkane@gmail.com>
Date: Wed, 22 Nov 2017 20:35:43 +0200
Subject: [PATCH] Try harder to find meson.py. Closes #2672.
---
mesonbuild/mesonlib.py | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index e9cf6cf96..56d347e3b 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -22,13 +22,35 @@
from glob import glob
+def detect_meson_py_location():
+ c = sys.argv[0]
+ c_fname = os.path.split(c)[1]
+ if c_fname == 'meson' or c_fname == 'meson.py':
+ # $ /foo/meson.py <args>
+ if os.path.isabs(c):
+ return c
+ # $ meson <args> (gets run from /usr/bin/meson)
+ in_path_exe = shutil.which(c_fname)
+ if in_path_exe:
+ return in_path_exe
+ # $ python3 ./meson.py <args>
+ if os.path.exists(c):
+ return os.path.join(os.getcwd(), c)
+
+ # 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')
+ if not os.path.exists(fname):
+ raise RuntimeError('Could not determine how to run Meson. Please file a bug with details.')
+ return fname
+
if os.path.basename(sys.executable) == 'meson.exe':
# In Windows and using the MSI installed executable.
meson_command = [sys.executable]
python_command = [sys.executable, 'runpython']
else:
- meson_command = [sys.executable, os.path.join(os.path.dirname(__file__), '..', 'meson.py')]
python_command = [sys.executable]
+ meson_command = python_command + [detect_meson_py_location()]
# Put this in objects that should not get dumped to pickle files
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment