From 4e37d3cd9aaba2519587b0029564d80893e4af7f Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 15 Jul 2004 09:48:22 +0000 Subject: [PATCH] gst/__init__.py: Use DLFCN instead of dl to help python installations without the dl module (gentoo for instance) Original commit message from CVS: * gst/__init__.py: Use DLFCN instead of dl to help python installations without the dl module (gentoo for instance) --- ChangeLog | 5 +++++ gst/__init__.py | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index eec540ab9d..738af87b06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-07-15 Johan Dahlin + + * gst/__init__.py: Use DLFCN instead of dl to help python + installations without the dl module (gentoo for instance) + 2004-07-13 Johan Dahlin * gst/gst.override (_wrap_gst_pad_query, _wrap_gst_element_query) diff --git a/gst/__init__.py b/gst/__init__.py index 49a25f2edf..6c82449e7f 100644 --- a/gst/__init__.py +++ b/gst/__init__.py @@ -20,9 +20,6 @@ # Author: David I. Lehn # -import sys -import dl - try: import ltihooks except: @@ -31,7 +28,11 @@ except: import gobject del gobject -sys.setdlopenflags(dl.RTLD_LAZY | dl.RTLD_GLOBAL) -del sys, dl +try: + import sys, DLFCN + sys.setdlopenflags(DLFCN.RTLD_LAZY | DLFCN.RTLD_GLOBAL) + del sys, DLFCN +except ImportError: + pass from _gst import *