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/gump build.py model.py view.py
Date Wed, 30 Apr 2003 11:11:33 GMT
rubys       2003/04/30 04:11:32

  Modified:    python/gump build.py model.py view.py
  Log:
  Support ids attribute on depend and option elements
  
  Revision  Changes    Path
  1.3       +5 -6      jakarta-gump/python/gump/build.py
  
  Index: build.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/build.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.py	28 Apr 2003 23:43:52 -0000	1.2
  +++ build.py	30 Apr 2003 11:11:32 -0000	1.3
  @@ -141,12 +141,11 @@
       buildbasedir = os.path.normpath(os.path.join(module.srcdir,ant.basedir or ''))
       log.debug('   SRCDIR:' + buildbasedir)
   
  -    classpath=''
  -    for depend in project.depend:#+project.option:
  -      p=Project.list[depend.project]
  -      srcdir=Module.list[p.module].srcdir
  -      for jar in p.jar:
  -        classpath = classpath + os.path.normpath(os.path.join(srcdir,jar.name)) + os.pathsep
  +    classpath=[]
  +    for depend in project.depend+project.option:
  +      for jar in depend.jars():
  +        classpath.append(jar.path)
  +    classpath=os.pathsep.join(classpath)
       log.debug('   CLASSPATH:' + classpath)
   
       properties=''
  
  
  
  1.2       +10 -4     jakarta-gump/python/gump/model.py
  
  Index: model.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- model.py	28 Apr 2003 23:43:52 -0000	1.1
  +++ model.py	30 Apr 2003 11:11:32 -0000	1.2
  @@ -331,7 +331,13 @@
   # TODO: set up the below elements with defaults using complete()
   
   # represents a <depend/> element
  -class Depend(GumpBase): pass
  +class Depend(GumpBase): 
  +  def jars(self):
  +    result=[]
  +    ids=(self.ids or '').split(' ')
  +    for jar in Project.list[self.project].jar:
  +      if (not self.ids) or (jar.id in ids): result.append(jar)
  +    return result
   
   # represents a <description/> element
   class Description(GumpBase): pass
  
  
  
  1.7       +4 -6      jakarta-gump/python/gump/view.py
  
  Index: view.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/view.py,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- view.py	28 Apr 2003 23:43:52 -0000	1.6
  +++ view.py	30 Apr 2003 11:11:32 -0000	1.7
  @@ -221,9 +221,7 @@
   
       # add in depends and options
       for depend in project.depend+project.option:
  -      p=Project.list[depend.project]
  -      srcdir=Module.list[p.module].srcdir
  -      for jar in p.jar:
  +      for jar in depend.jars():
           self.classpath.InsertStringItem(i,jar.path)
           i=i+1
   
  
  
  

Mime
View raw message