gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump model.py
Date Mon, 29 Sep 2003 23:20:00 GMT
ajack       2003/09/29 16:20:00

  Modified:    python/gump model.py
  Log:
  Allow packaged to override home
  
  Revision  Changes    Path
  1.20      +8 -8      jakarta-gump/python/gump/model.py
  
  Index: model.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model.py,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- model.py	25 Sep 2003 17:04:52 -0000	1.19
  +++ model.py	29 Sep 2003 23:20:00 -0000	1.20
  @@ -241,17 +241,17 @@
       # complete properties
       if self.ant: self.ant.complete(self)
       # compute home directory
  -    if self.home and isinstance(self.home,Single):
  +    from gump.logic import isPackaged    
  +    if isPackaged(self):
  +        self.home=os.path.abspath(os.path.join(workspace.pkgdir,self.package))
  +    elif self.home and isinstance(self.home,Single):
         if self.home.nested:
           srcdir=Module.list[self.module].srcdir
           self.home=os.path.abspath(os.path.join(srcdir,self.home.nested))
         elif self.home.parent:
           self.home=os.path.abspath(os.path.join(workspace.basedir,self.home.parent))
       elif not self.home:
  -      from gump.logic import isPackaged    
  -      if isPackaged(self):
  -        self.home=os.path.abspath(os.path.join(workspace.pkgdir,self.package))
  -      elif self.module:
  +      if self.module:
           self.home=os.path.abspath(Module.list[self.module].srcdir)
         else:
           self.home=os.path.abspath(os.path.join(workspace.basedir,self.name))
  
  
  

Mime
View raw message