By default, python isn't putting the purple.so or any dependency symbols
(oh hey, like libpurple.so!) in the global symbol table when loading it.
LD_PRELOAD works because the loader loads all libpurple's symbols before
python can. Thanks for darkrain42 for the help!
http://developer.pidgin.im/ticket/7872#comment:3
Signed-off-by: Bruno Abinader <bruno.abinader@openbossa.org>
+import sys, dl
+
+sys.setdlopenflags(dl.RTLD_NOW | dl.RTLD_GLOBAL)
+
import purple
# The information below is needed by libpurple
import purple
# The information below is needed by libpurple
-import purple
-import sys
+sys.setdlopenflags(dl.RTLD_NOW | dl.RTLD_GLOBAL)
+
+import purple
+
# The information below is needed by libpurple
__NAME__ = "nullclient"
__VERSION__ = "0.1"
# The information below is needed by libpurple
__NAME__ = "nullclient"
__VERSION__ = "0.1"