Commit df501ba2 authored by Cédric Bellegarde's avatar Cédric Bellegarde

Include a patched pygobject module to fix segfaults

parent df19c953
[submodule "subprojects/po"]
path = subprojects/po
url = https://github.com/gnumdk/eolie-po.git
[submodule "subprojects/python-gobject"]
path = subprojects/python-gobject
url = https://github.com/GNOME/pygobject.git
......@@ -9,6 +9,8 @@ import gettext
if 'EOLIE_TRACE' in os.environ:
from pycallgraph import PyCallGraph
from pycallgraph.output import GraphvizOutput
# Pygobject fix
sys.path.insert(0, '@EXTENSION_DIR@')
# Make sure we'll find the pygobject module, even in JHBuild
sys.path.insert(1, '@PYTHON_EXEC_DIR@')
# Make sure we'll find the eolie modules, even in JHBuild
......
......@@ -54,4 +54,5 @@ configure_file(
install_dir: bindir
)
meson.add_install_script('meson_fix_pygobject.py')
meson.add_install_script('meson_post_install.py')
......@@ -4,8 +4,14 @@ webkitextension = dependency('webkit2gtk-web-extension-4.0')
pyobject = dependency('pygobject-3.0')
python3 = dependency('python3')
pythonloader = configure_file(
input: 'pythonloader.c.in',
output: 'pythonloader.c',
configuration: conf
)
shared_library('pythonloader',
'pythonloader.c',
pythonloader,
dependencies: [webkitextension, pyobject, python3],
install: true,
install_dir: extension_dir)
......
......@@ -112,6 +112,12 @@ webkit_web_extension_initialize_with_user_data (WebKitWebExtension *extension,
PySys_SetArgvEx (1, argv, 0);
PyRun_SimpleString(
"import sys\n"
"sys.path.insert(0, '@EXTENSION_DIR@')\n"
);
pygobject_init (-1, -1, -1);
if (PyErr_Occurred ()) {
g_printerr ("Could not initialize PyGObject");
......
Subproject commit e502d0097f28e6c65d3d5120230fb428aabbc083
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