[gnome-continuous] Try out patch for meson#2672
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] Try out patch for meson#2672
- Date: Thu, 23 Nov 2017 14:40:25 +0000 (UTC)
commit 39a0fb3e3ffa8e806e41c458f3187066a37668af
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Nov 23 14:39:15 2017 +0000
Try out patch for meson#2672
manifest.json | 4 +--
patches/meson-issue-2672.patch | 50 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 3 deletions(-)
---
diff --git a/manifest.json b/manifest.json
index 0cfb6ce..a411ea5 100644
--- a/manifest.json
+++ b/manifest.json
@@ -68,10 +68,8 @@
"noarch": true},
{"src": "git:git://github.com/mesonbuild/meson.git",
- "tag": "d5a6ab31bfbcec9838805c598be75abb036aff87",
- "tag-reason": "Build failure when invoking meson --internal",
"component": "devel",
- "patches": ["python-meson-buildsys.patch"]},
+ "patches": ["python-meson-buildsys.patch", "meson-issue-2672.patch"]},
{"src": "gnome:glib",
"component": "minimal",
diff --git a/patches/meson-issue-2672.patch b/patches/meson-issue-2672.patch
new file mode 100644
index 0000000..fa6887c
--- /dev/null
+++ b/patches/meson-issue-2672.patch
@@ -0,0 +1,50 @@
+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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]