gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: jakarta-gump/python gumpcore.py gumpview.py
Date Mon, 28 Apr 2003 01:43:55 GMT
rubys       2003/04/27 18:43:55

  Modified:    python   gumpcore.py gumpview.py
  Log:
  Convert and depends to properties, and ant properties to project depends
  
  Revision  Changes    Path
  1.18      +34 -8     jakarta-gump/python/gumpcore.py
  
  Index: gumpcore.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gumpcore.py,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- gumpcore.py	27 Apr 2003 22:50:28 -0000	1.17
  +++ gumpcore.py	28 Apr 2003 01:43:55 -0000	1.18
  @@ -100,6 +100,8 @@
       self.__dict__[name]=value
     def __getitem__(self,name): 
       if name in self.__dict__: return self.__dict__[name]
  +  def __delitem__(self,name): 
  +    del self.__dict__[name]
     def __getattr__(self,name): 
       pass
     def __str__(self): 
  @@ -274,25 +276,25 @@
     # provide default elements when not defined in xml
     def complete(self,workspace):
       if self.isComplete: return
  -    deplist=[depend.project for depend in self.depend+self.option]
  -    self.isComplete=1
   
  -    for projname in deplist:
  -      project=Project.list.get(projname,None)
  +    # complete properties
  +    if self.ant: self.ant.complete(self)
  +
  +    # ensure that every project that this depends on is complete
  +    self.isComplete=1
  +    for depend in self.depend+self.option:
  +      project=Project.list.get(depend.project,None)
         if project: project.complete(workspace)
   
       # compute home directory
       if self.home and isinstance(self.home,Single):
         if self.home.nested:
           srcdir=Module.list[self.module].srcdir
  -        self.home=srcdir +'/' + self.home.nested
  +        self.home=srcdir + os.sep + self.home.nested
   
       # inherit dependencies:
       self.inheritDependencies()
   
  -    # complete properties
  -    if self.ant: self.ant.complete(self)
  -
     # Determine if this project has any unsatisfied dependencies left
     # on the todo list.
     def isReady(self,todo):
  @@ -379,6 +381,30 @@
   
     # provide default elements when not defined in xml
     def complete(self,project):
  +
  +    # convert property elements which reference a project into dependencies
  +    for property in self.property:
  +      if not property.project: continue
  +      if property.project==project.name: continue
  +      if property.reference=="srcdir": continue
  +      if project.hasFullDependencyOn(property.project): continue
  +
  +      depend=Depend({})
  +      depend['project']=property.project
  +      if not property.classpath: depend['noclasspath']=Single({})
  +      if property.runtime: depend['runtime']=property.runtime
  +      project.depend.append(depend)
  +      
  +    # convert all depend elements into property elements
  +    for depend in self.depend:
  +      property=Property(depend.__dict__)
  +      property['reference']='jarpath'
  +      property['name']=depend.project
  +      del property['project']
  +      self.property.append(property)
  +      project.depend.append(depend)
  +    self.depend=None
  +
       for property in self.property: property.complete(project)
   
   # represents a <nag/> element
  
  
  
  1.10      +0 -1      jakarta-gump/python/gumpview.py
  
  Index: gumpview.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gumpview.py,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- gumpview.py	28 Apr 2003 00:28:07 -0000	1.9
  +++ gumpview.py	28 Apr 2003 01:43:55 -0000	1.10
  @@ -91,7 +91,6 @@
       self.items=[]
       for parent in Project.list.values():
         list=parent.depend+parent.option
  -      if parent.ant: list+=parent.ant.depend
         for depend in list:
           if depend.project==project.name:
             self.items.append(parent.name)
  
  
  

Mime
View raw message