[gnome-builder/wip/beniofel/meson] meson updates



commit 1e86b607cd3babaec76d83641c0e986fca19bb54
Author: Ben Iofel <iofelben gmail com>
Date:   Wed Feb 24 01:35:22 2016 -0500

    meson updates

 plugins/meson/meson_build.py |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/plugins/meson/meson_build.py b/plugins/meson/meson_build.py
index cf7ba32..bec6b8c 100644
--- a/plugins/meson/meson_build.py
+++ b/plugins/meson/meson_build.py
@@ -4,7 +4,6 @@ from gi.repository import GObject
 from gi.repository import Ide
 
 class MesonBuildSystem(Ide.Object, Ide.BuildSystem, Gio.AsyncInitable):
-    context = GObject.Property(type=Ide.Context, 
flags=GObject.ParamFlags.CONSTRUCT_ONLY|GObject.ParamFlags.READWRITE)
     project_file = GObject.Property(type=Gio.File, 
flags=GObject.ParamFlags.CONSTRUCT_ONLY|GObject.ParamFlags.READWRITE)
 
     def do_init_async(self, priority, cancellable, callback, userdata):
@@ -29,31 +28,32 @@ class MesonBuildSystem(Ide.Object, Ide.BuildSystem, Gio.AsyncInitable):
 
 
 class MesonBuilder(Ide.Builder):
-    def do_build_async(self, flags, result, cancellable, callback, userdata=None):
+    def do_build_async(self, flags, cancellable, callback, result, userdata=None):
         # it's all synchronous for now, we'll make it async when it works
         workdir = self.get_context().get_vcs().get_working_directory()
         print("working in " + workdir.get_path())
-        builddir = workdir.get_child("build")
+        builddir = workdir.get_child('build')
         if not builddir.query_exists():
             builddir.make_directory()
-        if not builddir.get_child("build.ninja").query_exists():
-            launcher = Ide.SubprocessLauncher(Gio.SubprocessFlags.NONE)
+        if not builddir.get_child('build.ninja').query_exists():
+            launcher = Ide.SubprocessLauncher.new(Gio.SubprocessFlags.NONE)
             launcher.set_cwd(builddir.get_path())
-            launcher.push_args(["meson", workdir.get_path(), None])
+            launcher.push_args(['meson', workdir.get_path()])
             subproc = launcher.spawn_sync()
             print("running meson")
             subproc.wait()
 
-        launcher = Ide.SubprocessLauncher(Gio.SubprocessFlags.NONE)
+        launcher = Ide.SubprocessLauncher.new(Gio.SubprocessFlags.NONE)
         launcher.set_cwd(builddir.get_path())
-        launcher.push_args(["ninja"])
+        launcher.push_args(['ninja'])
         subproc = launcher.spawn_sync()
         print("running ninja")
         subproc.wait()
 
         res = MesonBuildResult()
-        task = Gio.Task(self, cancellable, callback)
+        task = Gio.Task.new(self, cancellable, callback)
         task.return_pointer(res)
+        return (res)
 
     def do_build_finish(self, result):
         return result.propagate_pointer()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]