Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv24720

Modified Files:
        plugin.py 
Log Message:
use $FREEVO_PYTHON if set to find the plugins

Index: plugin.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugin.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** plugin.py   12 Aug 2003 19:39:05 -0000      1.26
--- plugin.py   20 Aug 2003 21:26:36 -0000      1.27
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.27  2003/08/20 21:26:36  dischi
+ # use $FREEVO_PYTHON if set to find the plugins
+ #
  # Revision 1.26  2003/08/12 19:39:05  dischi
  # Added event_lister to get all events
***************
*** 207,213 ****
--- 210,222 ----
      global __all_plugins__
      global __initialized__
+     global __plugin_basedir__
      
      __initialized__ = TRUE
  
+     if os.environ.has_key('FREEVO_PYTHON') and os.environ['FREEVO_PYTHON']:
+         __plugin_basedir__ = os.environ['FREEVO_PYTHON']
+     else:
+         __plugin_basedir__ ='src'
+ 
      for name, type, level, args, number in __all_plugins__:
          __load_plugin__(name, type, level, args, number)
***************
*** 289,292 ****
--- 298,302 ----
  __named_plugins__      = {}
  
+ __plugin_basedir__     = ''
  
  def __add_to_ptl__(type, object):
***************
*** 307,327 ****
      global __plugin_type_list__
      global __named_plugins__
  
      module = name[:name.rfind('.')]
  
      # locate the plugin
!     if os.path.isfile('src/plugins/%s.py' % module):
          module  = 'plugins.%s' % module
          object  = 'plugins.%s' % name
          special = None
!     elif os.path.isfile('src/plugins/%s.py' % name):
          module  = 'plugins.%s' % name
          object  = 'plugins.%s.PluginInterface' % name
          special = None
!     elif os.path.isfile('src/%s/plugins/%s.py' % (module, name[name.rfind('.')+1:])):
          special = module
          module  = '%s.plugins.%s' % (module, name[name.rfind('.')+1:])
          object  = '%s.PluginInterface' % module
!     elif os.path.isdir('src/%s' % name):
          module  = name
          object  = '%s.PluginInterface' % module
--- 317,339 ----
      global __plugin_type_list__
      global __named_plugins__
+     global __plugin_basedir__
  
      module = name[:name.rfind('.')]
  
      # locate the plugin
!     if os.path.isfile(os.path.join(__plugin_basedir__, 'plugins/%s.py' % module)):
          module  = 'plugins.%s' % module
          object  = 'plugins.%s' % name
          special = None
!     elif os.path.isfile(os.path.join(__plugin_basedir__, 'plugins/%s.py' % name)):
          module  = 'plugins.%s' % name
          object  = 'plugins.%s.PluginInterface' % name
          special = None
!     elif os.path.isfile(os.path.join(__plugin_basedir__, '%s/plugins/%s.py' % \
!                                      (module, name[name.rfind('.')+1:]))):
          special = module
          module  = '%s.plugins.%s' % (module, name[name.rfind('.')+1:])
          object  = '%s.PluginInterface' % module
!     elif os.path.isdir(os.path.join(__plugin_basedir__, '%s' % name)):
          module  = name
          object  = '%s.PluginInterface' % module




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to