Fix Bug 327739

parent c925d966
2006-02-10 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
* src/nautilus-python.c (nautilus_python_init_python):
g_module_open libpythonX.Y.so, to make the symbols visible in
global namespace. Fixes #327739.
* src/Makefile.am (INCLUDES): Define PYTHON_VERSION.
* src/nautilusmodule.c: Missing #include <pygobject.h>.
2006-01-24 Gustavo J. A. M. Carneiro <gjc@gnome.org> 2006-01-24 Gustavo J. A. M. Carneiro <gjc@gnome.org>
* src/nautilus-python.h (np_init_pygobject): Don't try to set an * src/nautilus-python.h (np_init_pygobject): Don't try to set an
......
...@@ -6,6 +6,7 @@ INCLUDES = \ ...@@ -6,6 +6,7 @@ INCLUDES = \
-I$(top_builddir) \ -I$(top_builddir) \
$(DISABLE_DEPRECATED_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \
$(NAUTILUS_PYTHON_CFLAGS) \ $(NAUTILUS_PYTHON_CFLAGS) \
-DPYTHON_VERSION=\"$(PYTHON_VERSION)\" \
$(PY_CFLAGS) $(PY_CFLAGS)
PYTHON_LIBS = \ PYTHON_LIBS = \
......
...@@ -108,12 +108,17 @@ nautilus_python_init_python (gchar **user_extensions_dir) ...@@ -108,12 +108,17 @@ nautilus_python_init_python (gchar **user_extensions_dir)
{ {
PyObject *pygtk, *mdict, *require; PyObject *pygtk, *mdict, *require;
PyObject *sys_path, *nautilus, *gtk, *pygtk_version, *pygtk_required_version; PyObject *sys_path, *nautilus, *gtk, *pygtk_version, *pygtk_required_version;
GModule *libpython;
char *home_dir; char *home_dir;
char *argv[] = { "nautilus", NULL }; char *argv[] = { "nautilus", NULL };
if (Py_IsInitialized()) if (Py_IsInitialized())
return TRUE; return TRUE;
libpython = g_module_open("libpython" PYTHON_VERSION "." G_MODULE_SUFFIX, 0);
if (!libpython)
g_warning("g_module_open libpython failed: %s", g_module_error());
Py_Initialize(); Py_Initialize();
PySys_SetArgv(1, argv); PySys_SetArgv(1, argv);
......
...@@ -19,11 +19,13 @@ ...@@ -19,11 +19,13 @@
* USA * USA
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" # include "config.h"
#endif #endif
/* include this first, before NO_IMPORT_PYGOBJECT is defined */ /* include this first, before NO_IMPORT_PYGOBJECT is defined */
#include <pygobject.h>
#include <pygtk/pygtk.h> #include <pygtk/pygtk.h>
void pynautilus_register_classes (PyObject *d); void pynautilus_register_classes (PyObject *d);
......
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