ajack 2003/11/20 21:06:37
Modified: python/gump/test/resources/simple3 package1.xml
python/gump/model project.py
Log:
Second try at honorary packages.
Revision Changes Path
1.3 +8 -0 jakarta-gump/python/gump/test/resources/simple3/package1.xml
Index: package1.xml
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/test/resources/simple3/package1.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- package1.xml 21 Nov 2003 02:32:41 -0000 1.2
+++ package1.xml 21 Nov 2003 05:06:37 -0000 1.3
@@ -12,6 +12,7 @@
<ant target="gump"/>
+ <depend project="random"/>
<option project="random"/>
<home nested="dist"/>
@@ -22,6 +23,13 @@
<nag from="Gump Integration Build <[EMAIL PROTECTED]>"
to="[EMAIL PROTECTED]"/>
+ </project>
+
+ <project name="honorary1">
+ <package>org.apache.tools.ant</package>
+ <depend project="random"/>
+ <option project="random"/>
+ <home nested="dist"/>
</project>
</module>
1.15 +11 -5 jakarta-gump/python/gump/model/project.py
Index: project.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/model/project.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- project.py 21 Nov 2003 04:41:22 -0000 1.14
+++ project.py 21 Nov 2003 05:06:37 -0000 1.15
@@ -322,9 +322,11 @@
# we test the attribute for type.
#
def isPackaged(self):
- return (type(self.xml.package) in types.StringTypes) \
- or self.honoraryPackage
-
+ return self.isPackageMarked() or self.honoraryPackage
+
+ def isPackageMarked(self):
+ return (type(self.xml.package) in types.StringTypes)
+
def setHonoraryPackage(self,honorary):
self.honoraryPackage=honorary
@@ -341,7 +343,7 @@
#
packaged=self.isPackaged()
- # Import any <ant part
+ # Import any <ant part [if not packaged]
if self.xml.ant and not packaged:
self.ant = Ant(self.xml.ant,self)
@@ -350,7 +352,11 @@
# Compute home directory
if self.isPackaged():
# Installed below package directory
-
self.home=os.path.abspath(os.path.join(workspace.xml.pkgdir,self.xml.package))
+ if self.isPackageMarked():
+ self.home=os.path.abspath( \
+ os.path.join(workspace.xml.pkgdir, self.xml.package))
+ else:
+ self.home=os.path.abspath(workspace.xml.pkgdir)
elif self.xml.home and isinstance(self.xml.home,Single):
if self.xml.home.nested:
module=self.getModule()
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]