ajack 2004/04/25 18:00:34
Modified: python/gump/core commandLine.py
python/gump/svg depdiag.py
python gmp.py
Added: python/gump env.py
Log:
1) Added 'env' (to 'gmp env' an environment check). Not pretty output.
2) Minor tweaks.
Revision Changes Path
1.1 gump/python/gump/env.py
Index: env.py
===================================================================
#!/usr/bin/python
# Copyright 2003-2004 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Checks that the Gump Environment is ok.
"""
import os.path
import sys
from gump import log
from gump.core.gumpinit import gumpinit
from gump.core.gumpenv import GumpEnvironment
from gump.core.commandLine import handleArgv
# static void main()
if __name__=='__main__':
gumpinit()
# Process command line
(args,options) = handleArgv(sys.argv)
ws=args[0]
ps=args[1]
#
# Perform this check run...
#
result = 1
GumpEnvironment().checkEnvironment(1)
#
log.info('Gump Environment Check complete. Exit code:' + str(result))
# bye!
sys.exit(result)
1.5 +2 -2 gump/python/gump/core/commandLine.py
Index: commandLine.py
===================================================================
RCS file: /home/cvs/gump/python/gump/core/commandLine.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- commandLine.py 23 Apr 2004 18:09:24 -0000 1.4
+++ commandLine.py 26 Apr 2004 01:00:33 -0000 1.5
@@ -148,10 +148,10 @@
sys.exit(1)
for arg in argv:
- log.warn("Unused command line argument : " + arg)
+ log.debug("Unused command line argument : " + arg)
for arg in self.args:
- log.warn("Argument : " + arg)
+ log.debug("Argument : " + arg)
def getArguments(self):
return self.args
1.9 +9 -5 gump/python/gump/svg/depdiag.py
Index: depdiag.py
===================================================================
RCS file: /home/cvs/gump/python/gump/svg/depdiag.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- depdiag.py 22 Apr 2004 18:24:33 -0000 1.8
+++ depdiag.py 26 Apr 2004 01:00:33 -0000 1.9
@@ -203,17 +203,21 @@
for node in self.matrix.getNodes():
(row, col) = node.getRowCol()
- # rowWidth=self.matrix.getRowWidth(row+1)
+ rowColumns=self.matrix.getRowWidth(row)
# Center...
- #centeredCol = (float(rowWidth)/cols) * (1+col)
+ centeredCol = (float(cols)/float(rowColumns)) * col
- #print cols,rowWidth,row,col,' -> ',centeredCol
#print 'NODE (ROW,COL) : ' + `(row, col)`
- (x,y) = context.realPoint(row,col)
- #print '(X,Y) : ' + `(x, y)`
+ (x,y) = context.realPoint(row,centeredCol)
+ (x1,y1) = context.realPoint(row,col)
+ if y1 <> y:
+ print 'Cols:',cols,'Row Cols',rowColumns,' COLS:', col,' ->
',centeredCol
+ print '(X,Y) : ' + `(x, y)`
+ print '(X1,Y1) : ' + `(x1, y1)`
node.setPoint(Point(x,y))
+ node.setRowCol(row,centeredCol)
#
# Draw dependency lines
1.8 +2 -2 gump/python/gmp.py
Index: gmp.py
===================================================================
RCS file: /home/cvs/gump/python/gmp.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gmp.py 24 Apr 2004 15:25:18 -0000 1.7
+++ gmp.py 26 Apr 2004 01:00:33 -0000 1.8
@@ -118,7 +118,7 @@
args=sys.argv
try:
- print 'Apache Gump (A multi-project builder)'
+ # print 'Apache Gump (A multi-project builder)'
try:
# Process Environment
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]