[gnome-builder/wip/chergert/python-embed] wip on python embedding
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/python-embed] wip on python embedding
- Date: Sun, 24 Sep 2017 07:46:50 +0000 (UTC)
commit 90d8b2d49c690e24347d9d5ec7cec47fa49e2f72
Author: Christian Hergert <chergert redhat com>
Date: Sun Sep 24 00:46:16 2017 -0700
wip on python embedding
src/libide/Ide.py | 53 ++++++++++++++++++++
.../autotools_templates/__init__.pyc | Bin 0 -> 11860 bytes
.../beautifier_plugin/internal/align_makefile.pyc | Bin 0 -> 1115 bytes
src/plugins/cargo/cargo.gresource.xml | 10 ++++
src/plugins/cargo/cargo_plugin.pyc | Bin 0 -> 3533 bytes
src/plugins/cargo/meson.build | 14 ++---
src/plugins/cmake/cmake.gresource.xml | 10 ++++
src/plugins/cmake/cmake_plugin.pyc | Bin 0 -> 3929 bytes
src/plugins/cmake/meson.build | 14 ++---
src/plugins/color-picker/icons/render-assets.pyc | Bin 0 -> 1635 bytes
src/plugins/eslint/eslint.gresource.xml | 10 ++++
src/plugins/eslint/eslint_plugin.pyc | Bin 0 -> 3957 bytes
src/plugins/eslint/meson.build | 14 ++---
.../find-other-file/find-other-file.gresource.xml | 10 ++++
src/plugins/find-other-file/find_other_file.pyc | Bin 0 -> 5375 bytes
src/plugins/find-other-file/meson.build | 14 ++---
src/plugins/gjs-symbols/gjs-symbols.gresource.xml | 10 ++++
src/plugins/gjs-symbols/gjs_symbols.pyc | Bin 0 -> 12210 bytes
src/plugins/gjs-symbols/meson.build | 14 ++---
.../html-preview/html-preview.gresource.xml | 5 ++
src/plugins/html-preview/html_preview.pyc | Bin 0 -> 13759 bytes
src/plugins/html-preview/meson.build | 14 +-----
src/plugins/jedi/jedi.gresource.xml | 10 ++++
src/plugins/jedi/jedi_plugin.pyc | Bin 0 -> 22418 bytes
src/plugins/jedi/meson.build | 14 ++---
src/plugins/jhbuild/jhbuild.gresource.xml | 10 ++++
src/plugins/jhbuild/jhbuild_plugin.pyc | Bin 0 -> 3593 bytes
src/plugins/jhbuild/meson.build | 14 ++---
src/plugins/make/make.gresource.xml | 10 ++++
src/plugins/make/make_plugin.pyc | Bin 0 -> 4322 bytes
src/plugins/make/meson.build | 14 ++---
src/plugins/meson-templates/meson_templates.pyc | Bin 0 -> 9725 bytes
.../resources/build-aux/meson/postinstall.pyc | Bin 0 -> 680 bytes
.../meson-templates/resources/src/__init__.pyc | Bin 0 -> 114 bytes
.../resources/src/gi_composites.pyc | Bin 0 -> 6977 bytes
src/plugins/meson/meson.build | 14 ++---
src/plugins/meson/meson.gresource.xml | 10 ++++
src/plugins/meson/meson_plugin.pyc | Bin 0 -> 9776 bytes
src/plugins/mono/meson.build | 14 ++---
src/plugins/mono/mono.gresource.xml | 10 ++++
src/plugins/mono/mono_plugin.pyc | Bin 0 -> 920 bytes
src/plugins/npm/meson.build | 14 ++---
src/plugins/npm/npm.gresource.xml | 10 ++++
src/plugins/npm/npm_plugin.pyc | Bin 0 -> 2927 bytes
src/plugins/phpize/meson.build | 14 ++---
src/plugins/phpize/phpize.gresource.xml | 10 ++++
src/plugins/phpize/phpize_plugin.pyc | Bin 0 -> 7427 bytes
.../python-gi-imports-completion/meson.build | 14 ++---
.../python-gi-imports-completion.gresource.xml | 10 ++++
.../python_gi_imports_completion.pyc | Bin 0 -> 4729 bytes
src/plugins/rust-langserv/meson.build | 14 ++---
.../rust-langserv/rust-langserv.gresource.xml | 10 ++++
src/plugins/rust-langserv/rust_langserv_plugin.pyc | Bin 0 -> 6724 bytes
src/plugins/rustup/meson.build | 14 +-----
src/plugins/rustup/rustup.gresource.xml | 5 ++
src/plugins/rustup/rustup_plugin.pyc | Bin 0 -> 22402 bytes
src/plugins/valgrind/meson.build | 15 +-----
src/plugins/valgrind/valgrind-plugin.gresource.xml | 5 ++
src/plugins/valgrind/valgrind_plugin.pyc | Bin 0 -> 2192 bytes
59 files changed, 298 insertions(+), 149 deletions(-)
---
diff --git a/src/libide/Ide.py b/src/libide/Ide.py
index 9d79127..2d122df 100644
--- a/src/libide/Ide.py
+++ b/src/libide/Ide.py
@@ -22,7 +22,11 @@
from gi.repository import GLib
from gi.repository import GObject
from gi.repository import Gio
+
+import imp
import inspect
+import marshal
+import sys
from ..importer import modules
@@ -167,6 +171,53 @@ def NotSupportedError():
Ide.NotSupportedError = NotSupportedError
#
+# Custom module loader from embedded .gresources
+#
+
+_BASE_PLUGINS_PATH = '/org/gnome/builder/plugins'
+class _IdeResourceFinder(object):
+ def find_module(self, fullname, path=None):
+ def _generatePaths(name):
+ children = Gio.resources_enumerate_children(_BASE_PLUGINS_PATH, 0)
+ slashname = fullname.replace('.','/')
+ for child in children:
+ if child.endswith('/'):
+ yield _BASE_PLUGINS_PATH + '/%s%s.pyc' % (child, slashname)
+ yield _BASE_PLUGINS_PATH + '/%s%s/__init__.pyc' % (child, slashname)
+ yield _BASE_PLUGINS_PATH + '/%s%s.py' % (child, slashname)
+ yield _BASE_PLUGINS_PATH + '/%s%s/__init__.py' % (child, slashname)
+ raise StopIteration
+ for path in _generatePaths(fullname):
+ try:
+ Gio.resources_get_info(path, 0)
+ return _IdeResourceLoader(path)
+ except Exception as ex:
+ continue
+
+sys.meta_path.append(_IdeResourceFinder())
+
+class _IdeResourceLoader(object):
+ def __init__(self, path):
+ self.path = path
+
+ def load_module(self, name):
+ data = Gio.resources_lookup_data(self.path, 0)
+ bytes_data = data.get_data()
+
+ module = imp.new_module(name)
+ module.__name__ = name
+
+ if self.path.endswith('.pyc'):
+ code_object = marshal.loads(bytes_data)
+ exec(code_object, module.__dict__)
+ else:
+ source = bytes_data.decode('utf-8')
+ exec(source, module.__dict__)
+
+ sys.modules[name] = module
+ return module
+
+#
# GLib logging wrappers
#
@@ -201,3 +252,5 @@ Ide.debug = debug
Ide.info = info
Ide.message = message
Ide.warning = warning
+
+print("Ide.py overrides loaded")
diff --git a/src/plugins/autotools-templates/autotools_templates/__init__.pyc
b/src/plugins/autotools-templates/autotools_templates/__init__.pyc
new file mode 100644
index 0000000..5323187
Binary files /dev/null and b/src/plugins/autotools-templates/autotools_templates/__init__.pyc differ
diff --git a/src/plugins/beautifier/beautifier_plugin/internal/align_makefile.pyc
b/src/plugins/beautifier/beautifier_plugin/internal/align_makefile.pyc
new file mode 100644
index 0000000..830f83c
Binary files /dev/null and b/src/plugins/beautifier/beautifier_plugin/internal/align_makefile.pyc differ
diff --git a/src/plugins/cargo/cargo.gresource.xml b/src/plugins/cargo/cargo.gresource.xml
new file mode 100644
index 0000000..ebccf07
--- /dev/null
+++ b/src/plugins/cargo/cargo.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>cargo.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/cargo_plugin">
+ <file>cargo_plugin.py</file>
+ <file>cargo_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/cargo/cargo_plugin.pyc b/src/plugins/cargo/cargo_plugin.pyc
new file mode 100644
index 0000000..9ec7204
Binary files /dev/null and b/src/plugins/cargo/cargo_plugin.pyc differ
diff --git a/src/plugins/cargo/meson.build b/src/plugins/cargo/meson.build
index f9c1d25..873d902 100644
--- a/src/plugins/cargo/meson.build
+++ b/src/plugins/cargo/meson.build
@@ -1,13 +1,11 @@
if get_option('with_cargo')
-install_data('cargo_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'cargo.plugin',
- output: 'cargo.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+cargo_resources = gnome.compile_resources(
+ 'cargo-resources',
+ 'cargo.gresource.xml',
+ c_name: 'gbp_cargo',
)
+gnome_builder_plugins_sources += cargo_resources[0]
+
endif
diff --git a/src/plugins/cmake/cmake.gresource.xml b/src/plugins/cmake/cmake.gresource.xml
new file mode 100644
index 0000000..ce75c3e
--- /dev/null
+++ b/src/plugins/cmake/cmake.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>cmake.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/cmake_plugin">
+ <file>cmake_plugin.py</file>
+ <file>cmake_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/cmake/cmake_plugin.pyc b/src/plugins/cmake/cmake_plugin.pyc
new file mode 100644
index 0000000..cf3257b
Binary files /dev/null and b/src/plugins/cmake/cmake_plugin.pyc differ
diff --git a/src/plugins/cmake/meson.build b/src/plugins/cmake/meson.build
index 559066d..c79a416 100644
--- a/src/plugins/cmake/meson.build
+++ b/src/plugins/cmake/meson.build
@@ -1,13 +1,11 @@
if get_option('with_cmake')
-install_data('cmake_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'cmake.plugin',
- output: 'cmake.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+cmake_resources = gnome.compile_resources(
+ 'cmake-resources',
+ 'cmake.gresource.xml',
+ c_name: 'gbp_cmake',
)
+gnome_builder_plugins_sources += cmake_resources[0]
+
endif
diff --git a/src/plugins/color-picker/icons/render-assets.pyc
b/src/plugins/color-picker/icons/render-assets.pyc
new file mode 100644
index 0000000..637f0d0
Binary files /dev/null and b/src/plugins/color-picker/icons/render-assets.pyc differ
diff --git a/src/plugins/eslint/eslint.gresource.xml b/src/plugins/eslint/eslint.gresource.xml
new file mode 100644
index 0000000..2f488f7
--- /dev/null
+++ b/src/plugins/eslint/eslint.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>eslint.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/eslint_plugin">
+ <file>eslint_plugin.py</file>
+ <file>eslint_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/eslint/eslint_plugin.pyc b/src/plugins/eslint/eslint_plugin.pyc
new file mode 100644
index 0000000..5f0824f
Binary files /dev/null and b/src/plugins/eslint/eslint_plugin.pyc differ
diff --git a/src/plugins/eslint/meson.build b/src/plugins/eslint/meson.build
index a244e0a..905730f 100644
--- a/src/plugins/eslint/meson.build
+++ b/src/plugins/eslint/meson.build
@@ -1,16 +1,14 @@
if get_option('with_eslint')
-install_data('eslint_plugin.py', install_dir: plugindir)
-
install_data('org.gnome.builder.plugins.eslint.gschema.xml',
install_dir: schema_dir)
-configure_file(
- input: 'eslint.plugin',
- output: 'eslint.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+eslint_resources = gnome.compile_resources(
+ 'eslint-resources',
+ 'eslint.gresource.xml',
+ c_name: 'gbp_eslint',
)
+gnome_builder_plugins_sources += eslint_resources[0]
+
endif
diff --git a/src/plugins/find-other-file/find-other-file.gresource.xml
b/src/plugins/find-other-file/find-other-file.gresource.xml
new file mode 100644
index 0000000..2531c58
--- /dev/null
+++ b/src/plugins/find-other-file/find-other-file.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>find-other-file.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/find_other_file">
+ <file>find_other_file.py</file>
+ <file>find_other_file.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/find-other-file/find_other_file.pyc b/src/plugins/find-other-file/find_other_file.pyc
new file mode 100644
index 0000000..19a62b9
Binary files /dev/null and b/src/plugins/find-other-file/find_other_file.pyc differ
diff --git a/src/plugins/find-other-file/meson.build b/src/plugins/find-other-file/meson.build
index 8781c95..5526827 100644
--- a/src/plugins/find-other-file/meson.build
+++ b/src/plugins/find-other-file/meson.build
@@ -1,13 +1,11 @@
if get_option('with_find_other_file')
-install_data('find_other_file.py', install_dir: plugindir)
-
-configure_file(
- input: 'find-other-file.plugin',
- output: 'find-other-file.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+find_other_file_resources = gnome.compile_resources(
+ 'find-other-file-resources',
+ 'find-other-file.gresource.xml',
+ c_name: 'gbp_find_other_file',
)
+gnome_builder_plugins_sources += find_other_file_resources[0]
+
endif
diff --git a/src/plugins/gjs-symbols/gjs-symbols.gresource.xml
b/src/plugins/gjs-symbols/gjs-symbols.gresource.xml
new file mode 100644
index 0000000..9adc69e
--- /dev/null
+++ b/src/plugins/gjs-symbols/gjs-symbols.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>gjs_symbols.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/gjs_symbols">
+ <file>gjs_symbols.py</file>
+ <file>gjs_symbols.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/gjs-symbols/gjs_symbols.pyc b/src/plugins/gjs-symbols/gjs_symbols.pyc
new file mode 100644
index 0000000..ff386d8
Binary files /dev/null and b/src/plugins/gjs-symbols/gjs_symbols.pyc differ
diff --git a/src/plugins/gjs-symbols/meson.build b/src/plugins/gjs-symbols/meson.build
index 9a8759a..f264599 100644
--- a/src/plugins/gjs-symbols/meson.build
+++ b/src/plugins/gjs-symbols/meson.build
@@ -1,13 +1,11 @@
if get_option('with_gjs_symbols')
-install_data('gjs_symbols.py', install_dir: plugindir)
-
-configure_file(
- input: 'gjs_symbols.plugin',
- output: 'gjs_symbols.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+gjs_symbols_resources = gnome.compile_resources(
+ 'gjs-symbols-resources',
+ 'gjs-symbols.gresource.xml',
+ c_name: 'gjs_symbols',
)
+gnome_builder_plugins_sources += gjs_symbols_resources[0]
+
endif
diff --git a/src/plugins/html-preview/html-preview.gresource.xml
b/src/plugins/html-preview/html-preview.gresource.xml
index bcc1fe4..6cacee5 100644
--- a/src/plugins/html-preview/html-preview.gresource.xml
+++ b/src/plugins/html-preview/html-preview.gresource.xml
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>html-preview.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/html_preview">
+ <file>html_preview.py</file>
+ <file>html_preview.pyc</file>
<file>js/markdown-view.js</file>
<file>js/marked.js</file>
<file>css/markdown.css</file>
diff --git a/src/plugins/html-preview/html_preview.pyc b/src/plugins/html-preview/html_preview.pyc
new file mode 100644
index 0000000..981eb35
Binary files /dev/null and b/src/plugins/html-preview/html_preview.pyc differ
diff --git a/src/plugins/html-preview/meson.build b/src/plugins/html-preview/meson.build
index 299493c..05e95d2 100644
--- a/src/plugins/html-preview/meson.build
+++ b/src/plugins/html-preview/meson.build
@@ -3,19 +3,9 @@ if get_option('with_html_preview')
html_preview_resources = gnome.compile_resources(
'html_preview',
'html-preview.gresource.xml',
- gresource_bundle: true,
- install: true,
- install_dir: plugindir,
+ c_name: 'gbp_html_preview',
)
-install_data('html_preview.py', install_dir: plugindir)
-
-configure_file(
- input: 'html-preview.plugin',
- output: 'html-preview.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += html_preview_resources[0]
endif
diff --git a/src/plugins/jedi/jedi.gresource.xml b/src/plugins/jedi/jedi.gresource.xml
new file mode 100644
index 0000000..bb90f9e
--- /dev/null
+++ b/src/plugins/jedi/jedi.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>jedi.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/jedi_plugin">
+ <file>jedi_plugin.py</file>
+ <file>jedi_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/jedi/jedi_plugin.pyc b/src/plugins/jedi/jedi_plugin.pyc
new file mode 100644
index 0000000..3751ac3
Binary files /dev/null and b/src/plugins/jedi/jedi_plugin.pyc differ
diff --git a/src/plugins/jedi/meson.build b/src/plugins/jedi/meson.build
index bfe1a62..e29b5a1 100644
--- a/src/plugins/jedi/meson.build
+++ b/src/plugins/jedi/meson.build
@@ -1,13 +1,11 @@
if get_option('with_jedi')
-install_data('jedi_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'jedi.plugin',
- output: 'jedi.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+jedi_resources = gnome.compile_resources(
+ 'jedi-resources',
+ 'jedi.gresource.xml',
+ c_name: 'gbp_jedi',
)
+gnome_builder_plugins_sources += jedi_resources[0]
+
endif
diff --git a/src/plugins/jhbuild/jhbuild.gresource.xml b/src/plugins/jhbuild/jhbuild.gresource.xml
new file mode 100644
index 0000000..2d915b4
--- /dev/null
+++ b/src/plugins/jhbuild/jhbuild.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>jhbuild.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/jhbuild_plugin">
+ <file>jhbuild_plugin.py</file>
+ <file>jhbuild_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/jhbuild/jhbuild_plugin.pyc b/src/plugins/jhbuild/jhbuild_plugin.pyc
new file mode 100644
index 0000000..b910d16
Binary files /dev/null and b/src/plugins/jhbuild/jhbuild_plugin.pyc differ
diff --git a/src/plugins/jhbuild/meson.build b/src/plugins/jhbuild/meson.build
index ac948fe..12d59c6 100644
--- a/src/plugins/jhbuild/meson.build
+++ b/src/plugins/jhbuild/meson.build
@@ -1,13 +1,11 @@
if get_option('with_jhbuild')
-install_data('jhbuild_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'jhbuild.plugin',
- output: 'jhbuild.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+jhbuild_resources = gnome.compile_resources(
+ 'jhbuild-resources',
+ 'jhbuild.gresource.xml',
+ c_name: 'gbp_jhbuild',
)
+gnome_builder_plugins_sources += jhbuild_resources[0]
+
endif
diff --git a/src/plugins/make/make.gresource.xml b/src/plugins/make/make.gresource.xml
new file mode 100644
index 0000000..5954ef7
--- /dev/null
+++ b/src/plugins/make/make.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>make.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/make_plugin">
+ <file>make_plugin.py</file>
+ <file>make_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/make/make_plugin.pyc b/src/plugins/make/make_plugin.pyc
new file mode 100644
index 0000000..5f11869
Binary files /dev/null and b/src/plugins/make/make_plugin.pyc differ
diff --git a/src/plugins/make/meson.build b/src/plugins/make/meson.build
index bd398a9..a0545c4 100644
--- a/src/plugins/make/meson.build
+++ b/src/plugins/make/meson.build
@@ -1,13 +1,11 @@
if get_option('with_make')
-install_data('make_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'make.plugin',
- output: 'make.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+make_resources = gnome.compile_resources(
+ 'make-resources',
+ 'make.gresource.xml',
+ c_name: 'gbp_make',
)
+gnome_builder_plugins_sources += make_resources[0]
+
endif
diff --git a/src/plugins/meson-templates/meson_templates.pyc b/src/plugins/meson-templates/meson_templates.pyc
new file mode 100644
index 0000000..8107f43
Binary files /dev/null and b/src/plugins/meson-templates/meson_templates.pyc differ
diff --git a/src/plugins/meson-templates/resources/build-aux/meson/postinstall.pyc
b/src/plugins/meson-templates/resources/build-aux/meson/postinstall.pyc
new file mode 100644
index 0000000..46a3e33
Binary files /dev/null and b/src/plugins/meson-templates/resources/build-aux/meson/postinstall.pyc differ
diff --git a/src/plugins/meson-templates/resources/src/__init__.pyc
b/src/plugins/meson-templates/resources/src/__init__.pyc
new file mode 100644
index 0000000..e569a2f
Binary files /dev/null and b/src/plugins/meson-templates/resources/src/__init__.pyc differ
diff --git a/src/plugins/meson-templates/resources/src/gi_composites.pyc
b/src/plugins/meson-templates/resources/src/gi_composites.pyc
new file mode 100644
index 0000000..217acea
Binary files /dev/null and b/src/plugins/meson-templates/resources/src/gi_composites.pyc differ
diff --git a/src/plugins/meson/meson.build b/src/plugins/meson/meson.build
index e3dc432..75a794a 100644
--- a/src/plugins/meson/meson.build
+++ b/src/plugins/meson/meson.build
@@ -1,13 +1,11 @@
if get_option('with_meson')
-install_data('meson_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'meson.plugin',
- output: 'meson.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+meson_resources = gnome.compile_resources(
+ 'builder-meson-resources',
+ 'meson.gresource.xml',
+ c_name: 'gbp_meson',
)
+gnome_builder_plugins_sources += meson_resources[0]
+
endif
diff --git a/src/plugins/meson/meson.gresource.xml b/src/plugins/meson/meson.gresource.xml
new file mode 100644
index 0000000..4264e86
--- /dev/null
+++ b/src/plugins/meson/meson.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>meson.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/meson_plugin">
+ <file>meson_plugin.py</file>
+ <file>meson_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/meson/meson_plugin.pyc b/src/plugins/meson/meson_plugin.pyc
new file mode 100644
index 0000000..2b39da4
Binary files /dev/null and b/src/plugins/meson/meson_plugin.pyc differ
diff --git a/src/plugins/mono/meson.build b/src/plugins/mono/meson.build
index bad0072..facf94a 100644
--- a/src/plugins/mono/meson.build
+++ b/src/plugins/mono/meson.build
@@ -1,13 +1,11 @@
if get_option('with_mono')
-install_data('mono_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'mono.plugin',
- output: 'mono.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+mono_resources = gnome.compile_resources(
+ 'mono-resources',
+ 'mono.gresource.xml',
+ c_name: 'gbp_mono',
)
+gnome_builder_plugins_sources += mono_resources[0]
+
endif
diff --git a/src/plugins/mono/mono.gresource.xml b/src/plugins/mono/mono.gresource.xml
new file mode 100644
index 0000000..bdd4ae1
--- /dev/null
+++ b/src/plugins/mono/mono.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>mono.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/mono_plugin">
+ <file>mono_plugin.py</file>
+ <file>mono_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/mono/mono_plugin.pyc b/src/plugins/mono/mono_plugin.pyc
new file mode 100644
index 0000000..18eebf6
Binary files /dev/null and b/src/plugins/mono/mono_plugin.pyc differ
diff --git a/src/plugins/npm/meson.build b/src/plugins/npm/meson.build
index cd9678b..4c693a3 100644
--- a/src/plugins/npm/meson.build
+++ b/src/plugins/npm/meson.build
@@ -1,13 +1,11 @@
if get_option('with_npm')
-install_data('npm_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'npm.plugin',
- output: 'npm.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+npm_resources = gnome.compile_resources(
+ 'npm-resources',
+ 'npm.gresource.xml',
+ c_name: 'gbp_npm',
)
+gnome_builder_plugins_sources += npm_resources[0]
+
endif
diff --git a/src/plugins/npm/npm.gresource.xml b/src/plugins/npm/npm.gresource.xml
new file mode 100644
index 0000000..def70a2
--- /dev/null
+++ b/src/plugins/npm/npm.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>npm.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/npm_plugin">
+ <file>npm_plugin.py</file>
+ <file>npm_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/npm/npm_plugin.pyc b/src/plugins/npm/npm_plugin.pyc
new file mode 100644
index 0000000..4c096f4
Binary files /dev/null and b/src/plugins/npm/npm_plugin.pyc differ
diff --git a/src/plugins/phpize/meson.build b/src/plugins/phpize/meson.build
index d1ff850..6b1ab97 100644
--- a/src/plugins/phpize/meson.build
+++ b/src/plugins/phpize/meson.build
@@ -1,13 +1,11 @@
if get_option('with_phpize')
-install_data('phpize_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'phpize.plugin',
- output: 'phpize.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+phpize_resources = gnome.compile_resources(
+ 'phpize-resources',
+ 'phpize.gresource.xml',
+ c_name: 'gbp_phpize',
)
+gnome_builder_plugins_sources += phpize_resources[0]
+
endif
diff --git a/src/plugins/phpize/phpize.gresource.xml b/src/plugins/phpize/phpize.gresource.xml
new file mode 100644
index 0000000..fcc3eac
--- /dev/null
+++ b/src/plugins/phpize/phpize.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>phpize.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/phpize_plugin">
+ <file>phpize_plugin.py</file>
+ <file>phpize_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/phpize/phpize_plugin.pyc b/src/plugins/phpize/phpize_plugin.pyc
new file mode 100644
index 0000000..326d26b
Binary files /dev/null and b/src/plugins/phpize/phpize_plugin.pyc differ
diff --git a/src/plugins/python-gi-imports-completion/meson.build
b/src/plugins/python-gi-imports-completion/meson.build
index 496138e..c09f9ce 100644
--- a/src/plugins/python-gi-imports-completion/meson.build
+++ b/src/plugins/python-gi-imports-completion/meson.build
@@ -1,13 +1,11 @@
if get_option('with_python_gi_imports_completion')
-install_data('python_gi_imports_completion.py', install_dir: plugindir)
-
-configure_file(
- input: 'python-gi-imports-completion.plugin',
- output: 'python-gi-imports-completion.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+python_gi_imports_completion_resources = gnome.compile_resources(
+ 'python-gi-imports-completion-resources',
+ 'python-gi-imports-completion.gresource.xml',
+ c_name: 'gbp_python_gi_imports_completion',
)
+gnome_builder_plugins_sources += python_gi_imports_completion_resources[0]
+
endif
diff --git a/src/plugins/python-gi-imports-completion/python-gi-imports-completion.gresource.xml
b/src/plugins/python-gi-imports-completion/python-gi-imports-completion.gresource.xml
new file mode 100644
index 0000000..d91ae78
--- /dev/null
+++ b/src/plugins/python-gi-imports-completion/python-gi-imports-completion.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>python-gi-imports-completion.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/python_gi_imports_completion">
+ <file>python_gi_imports_completion.py</file>
+ <file>python_gi_imports_completion.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/python-gi-imports-completion/python_gi_imports_completion.pyc
b/src/plugins/python-gi-imports-completion/python_gi_imports_completion.pyc
new file mode 100644
index 0000000..2d7a999
Binary files /dev/null and b/src/plugins/python-gi-imports-completion/python_gi_imports_completion.pyc differ
diff --git a/src/plugins/rust-langserv/meson.build b/src/plugins/rust-langserv/meson.build
index cb3cb76..af2562c 100644
--- a/src/plugins/rust-langserv/meson.build
+++ b/src/plugins/rust-langserv/meson.build
@@ -1,13 +1,11 @@
if get_option('with_rust_langserv')
-install_data('rust_langserv_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'rust-langserv.plugin',
- output: 'rust-langserv.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
+rust_langserv_resources = gnome.compile_resources(
+ 'rust-langserv-resources',
+ 'rust-langserv.gresource.xml',
+ c_name: 'gbp_rust_langserv',
)
+gnome_builder_plugins_sources += rust_langserv_resources[0]
+
endif
diff --git a/src/plugins/rust-langserv/rust-langserv.gresource.xml
b/src/plugins/rust-langserv/rust-langserv.gresource.xml
new file mode 100644
index 0000000..783522c
--- /dev/null
+++ b/src/plugins/rust-langserv/rust-langserv.gresource.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>rust-langserv.plugin</file>
+ </gresource>
+ <gresource prefix="/org/gnome/builder/plugins/rust_langserv_plugin">
+ <file>rust_langserv_plugin.py</file>
+ <file>rust_langserv_plugin.pyc</file>
+ </gresource>
+</gresources>
diff --git a/src/plugins/rust-langserv/rust_langserv_plugin.pyc
b/src/plugins/rust-langserv/rust_langserv_plugin.pyc
new file mode 100644
index 0000000..b250261
Binary files /dev/null and b/src/plugins/rust-langserv/rust_langserv_plugin.pyc differ
diff --git a/src/plugins/rustup/meson.build b/src/plugins/rustup/meson.build
index 9f97348..0a14520 100644
--- a/src/plugins/rustup/meson.build
+++ b/src/plugins/rustup/meson.build
@@ -3,19 +3,9 @@ if get_option('with_rustup')
rustup_resources = gnome.compile_resources(
'rustup_plugin',
'rustup.gresource.xml',
- gresource_bundle: true,
- install: true,
- install_dir: plugindir,
+ c_name: 'gbp_rustup',
)
-install_data('rustup_plugin.py', install_dir: plugindir)
-
-configure_file(
- input: 'rustup.plugin',
- output: 'rustup.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += rustup_resources[0]
endif
diff --git a/src/plugins/rustup/rustup.gresource.xml b/src/plugins/rustup/rustup.gresource.xml
index cf7bc40..01109ec 100644
--- a/src/plugins/rustup/rustup.gresource.xml
+++ b/src/plugins/rustup/rustup.gresource.xml
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>rustup.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/rustup_plugin">
<file>rustup.sh</file>
+ <file>rustup_plugin.py</file>
+ <file>rustup_plugin.pyc</file>
</gresource>
</gresources>
diff --git a/src/plugins/rustup/rustup_plugin.pyc b/src/plugins/rustup/rustup_plugin.pyc
new file mode 100644
index 0000000..8e85d37
Binary files /dev/null and b/src/plugins/rustup/rustup_plugin.pyc differ
diff --git a/src/plugins/valgrind/meson.build b/src/plugins/valgrind/meson.build
index 7bcf042..788b16e 100644
--- a/src/plugins/valgrind/meson.build
+++ b/src/plugins/valgrind/meson.build
@@ -1,22 +1,11 @@
if get_option('with_valgrind')
-install_data('valgrind_plugin.py', install_dir: plugindir)
-
valgrind_resources = gnome.compile_resources(
'valgrind_plugin',
'valgrind-plugin.gresource.xml',
-
- gresource_bundle: true,
- install: true,
- install_dir: plugindir,
+ c_name: 'gbp_valgrind',
)
-configure_file(
- input: 'valgrind.plugin',
- output: 'valgrind.plugin',
- configuration: configuration_data(),
- install: true,
- install_dir: plugindir,
-)
+gnome_builder_plugins_sources += valgrind_resources[0]
endif
diff --git a/src/plugins/valgrind/valgrind-plugin.gresource.xml
b/src/plugins/valgrind/valgrind-plugin.gresource.xml
index 2c0ad6e..751662a 100644
--- a/src/plugins/valgrind/valgrind-plugin.gresource.xml
+++ b/src/plugins/valgrind/valgrind-plugin.gresource.xml
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
+ <gresource prefix="/org/gnome/builder/plugins">
+ <file>valgrind.plugin</file>
+ </gresource>
<gresource prefix="/org/gnome/builder/plugins/valgrind_plugin">
<file>gtk/menus.ui</file>
+ <file>valgrind_plugin.py</file>
+ <file>valgrind_plugin.pyc</file>
</gresource>
</gresources>
diff --git a/src/plugins/valgrind/valgrind_plugin.pyc b/src/plugins/valgrind/valgrind_plugin.pyc
new file mode 100644
index 0000000..851a65e
Binary files /dev/null and b/src/plugins/valgrind/valgrind_plugin.pyc differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]