You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by Adam Jack <aj...@TrySybase.com> on 2003/05/07 05:33:19 UTC

Python Gump

Is there a readme or something for getting started?

regards

Adam

----------------------------------------------------------------------------
------------------------

F:\data\CommonsVersion\Gump\python>dir
 Volume in drive F has no label.
 Volume Serial Number is 8095-2F0B

 Directory of F:\data\CommonsVersion\Gump\python

05/06/2003  09:27p      <DIR>          .
05/06/2003  09:27p      <DIR>          ..
05/06/2003  09:24p                  19 .cvsignore
03/13/2003  11:11a      <DIR>          CVS
04/28/2003  02:00a                 279 exe.py
05/06/2003  09:25p      <DIR>          gump
04/27/2003  07:30a               1,513 gumpconf.pyc
04/26/2003  08:45a              20,114 gumpcore.pyc
04/27/2003  07:30a               1,784 gumputil.pyc
04/27/2003  07:25a      <DIR>          logging
04/27/2003  07:25a      <DIR>          ruper
               5 File(s)         23,709 bytes
               6 Dir(s)  63,285,022,720 bytes free

F:\data\CommonsVersion\Gump\python>exe.py
Traceback (most recent call last):
  File "F:\data\CommonsVersion\Gump\python\exe.py", line 3, in ?
    import py2exe
ImportError: No module named py2exe

F:\data\CommonsVersion\Gump\python>gumpconf.pyc

F:\data\CommonsVersion\Gump\python>gumputil.pyc

F:\data\CommonsVersion\Gump\python>gumpcore.pyc


               *** starting DEMO ***
opening: F:\data\CommonsVersion\Gump\trysybase\profile.xml

opening: F:\data\CommonsVersion\Gump\project\ant.xml

.....

workspace: wdn086.xml
full path: F:\data\CommonsVersion\Gump\wdn086.xml

basedir:        F:/data/CommonsVersion/Gump/testing/gump-ws
pkgdir:         F:/data/CommonsVersion/Gump/testing/packages
Property:       build.sysclasspath last
Property:       jars.dir
/homelocal/build/packages/krysalis-centipede-1.0.0-beta4/tools/jars/
Property:       deployer.username arb_jack
Property:       forrest.home
/homelocal/build/packages/apache-forrest-0.4-bin

*** JDBC ***

Traceback (most recent call last):
  File "gumpcore.py", line 434, in ?
KeyError: jdbc

F:\data\CommonsVersion\Gump\python>

--
<http://www.try.sybase.com>
Experience Sybase Technology ...


Re: Python Gump

Posted by Nick Chalko <ni...@chalko.com>.
you could try to fry your modem with ssh -X   and the pure java Xserver  
weirdX  http://www.jcraft.com/weirdx/
  :-P


-- 
Nick Chalko                                         Show me the code.
                          Centipede
  Ant + autodownloadable build plugins + needed jars autodownload.
              http://krysalis.org/centipede
---------------------------------------------------------------------



RE: Python Gump

Posted by Adam Jack <aj...@TrySybase.com>.
	You need not hackthe build.sh.  The current syntax is

	build.sh project arguments-to-ant

	This includes, but is not limited to, -debug, ant target(s), etc.

My bad, I was confusing this with hacking the -debug into the build file
when I needed to debug a "build.sh all". I recall now this was 'cos of (2)
below -- where the buildfile 'all' task worked so 'build xxx' worked, but
the buildfile 'gump' task failed (oddly) and I couldn't debug it. Took me
eons to spot that all not gump was being called (since most of the sub-tasks
were the same.)

I would love the ability to specify "-debug" inside a descriptor --- for a
single invocation, for it to show up on the ant command line. And thinking
about it -- if you are going after more than just ant (maven or centipede or
whatever) it might be important to pass more than -D properties, but command
line arguments.

	> 2) Ant Task
	>
	> One thing that struck me as a bug w/ current gump (and confused the heck
out
	> of me for a while) is that (IMHO) running a build of an individual
project
	> ought be *exactly* the same as when running a 'build all' except for
	> quicker. What seems to be the case today is that when running solo one
has
	> to pass the ant task, it doesn't get taken from the descriptor, or the
	> buildfile default gets used. [I had a "gump" task, but the buildfile
default
	> was "all", and I couldn't figure out what was going on.]

	I'd like to keep the ability to specify arguments, including tasks, when
	running an individual build.  Do you agree?

Yes, but what I am saying is that the default (if no target supplied) ought
be the ant target (and whatever else) specified in gump, not the one in the
build.sh. If one wanted to debug ant scripts they out run "ant xxxx", but
here they are trying to debug/test their gump set-up so "gump xxxxx" ought
be based of the gump descriptor (unless they chose to override).

regards,

Adam


Re: Python Gump

Posted by Sam Ruby <ru...@apache.org>.
Adam Jack wrote:
> 	python gump.build.py -opts the-project-to-build arguments-to-ant
> 
> Just to clarify this, does this mean one does not pass the ant task? How
> would one pass "-debug" to ant command line, and how would one specify a
> target?
> 
> 1) -debug
> 
> Today I have to hack the build.sh to add a -debug. With Python  I doubt I'll
> want to try that, so I need it to be built in.

You need not hackthe build.sh.  The current syntax is

build.sh project arguments-to-ant

This includes, but is not limited to, -debug, ant target(s), etc.

> 2) Ant Task
> 
> One thing that struck me as a bug w/ current gump (and confused the heck out
> of me for a while) is that (IMHO) running a build of an individual project
> ought be *exactly* the same as when running a 'build all' except for
> quicker. What seems to be the case today is that when running solo one has
> to pass the ant task, it doesn't get taken from the descriptor, or the
> buildfile default gets used. [I had a "gump" task, but the buildfile default
> was "all", and I couldn't figure out what was going on.]

I'd like to keep the ability to specify arguments, including tasks, when 
running an individual build.  Do you agree?

> regards,
> 
> Adam

- Sam Ruby



Re: Python Gump

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Sam Ruby wrote, On 08/05/2003 2.50:
> Nicola Ken Barozzi wrote:
> 
...
> My preference is to make this:
> 
> python gump.build.py -opts the-project-to-build arguments-to-ant
> 
> where -opts would include -w myworkspace.xml
> 
> This would allow it to be used in much the same way that I currently use 
> the java/xsl based gump.  Note that this would only bulid the project 
> that one specifies (or all).

Yes, yesterday evening I took your code in update.py and refactored it 
out in conf.py and made all other .pys use it. Unfortunately CVS was 
down and I didn't commit, I'll do it now.

> I've debugged adding html output to update.py, I'll probably commit it 
> tomorrow.  My goal is to configure moof to build nightly using the 
> python implementation of gump.

I saw a message on infrastructure and I guessed so :-)

Way to gooo! :-D

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


RE: Python Gump

Posted by Adam Jack <aj...@TrySybase.com>.
	python gump.build.py -opts the-project-to-build arguments-to-ant

Just to clarify this, does this mean one does not pass the ant task? How
would one pass "-debug" to ant command line, and how would one specify a
target?

1) -debug

Today I have to hack the build.sh to add a -debug. With Python  I doubt I'll
want to try that, so I need it to be built in.

2) Ant Task

One thing that struck me as a bug w/ current gump (and confused the heck out
of me for a while) is that (IMHO) running a build of an individual project
ought be *exactly* the same as when running a 'build all' except for
quicker. What seems to be the case today is that when running solo one has
to pass the ant task, it doesn't get taken from the descriptor, or the
buildfile default gets used. [I had a "gump" task, but the buildfile default
was "all", and I couldn't figure out what was going on.]

regards,

Adam


Re: Python Gump

Posted by Sam Ruby <ru...@apache.org>.
Nicola Ken Barozzi wrote:
> 
  > Try:
>    python gump/build.py myworkspace.xml the-project-to-build
> 
> I'll fix the error message and reverse the workspace and project 
> definition requirements in the arguments
> (python gump/build.py the-project-to-build myworkspace.xml)

My preference is to make this:

python gump.build.py -opts the-project-to-build arguments-to-ant

where -opts would include -w myworkspace.xml

This would allow it to be used in much the same way that I currently use 
the java/xsl based gump.  Note that this would only bulid the project 
that one specifies (or all).

I've debugged adding html output to update.py, I'll probably commit it 
tomorrow.  My goal is to configure moof to build nightly using the 
python implementation of gump.

- Sam Ruby



RE: Python Gump

Posted by Adam Jack <aj...@TrySybase.com>.
Clearly my new Python on Linux is dorked, I'll check into it...

[build@tsbuild1 python]$ pyppm
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/local/ActivePython-2.2//bin/pyppm", line 7, in ?
    import os, sys, string
ImportError: No module named os
[build@tsbuild1 python]$

-----Original Message-----
From: Adam Jack [mailto:ajack@trysybase.com]
Sent: Wednesday, May 07, 2003 3:35 PM
To: 'Gump code and data'; ajack@trysybase.com
Subject: RE: Python Gump


CVS seems cleared up, so I grabbed the latest stuff.

Does this mean my python or environment is a sick puppy?

python -v gump/build.py tsbuild1.xml krysalis-cents-all

'import site' failed; traceback:
ImportError: No module named site
ActivePython 2.2.2 Build 224 (ActiveState Corp.) based on
Python 2.2.2 (#1, Nov 26 2002, 10:26:58)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "gump/build.py", line 15, in ?
    import os.path
ImportError: No module named os.path
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# restore sys.stdin


---------------------------------------------------------------------
To unsubscribe, e-mail: gump-unsubscribe@jakarta.apache.org
For additional commands, e-mail: gump-help@jakarta.apache.org


RE: Python Gump

Posted by Adam Jack <aj...@TrySybase.com>.
CVS seems cleared up, so I grabbed the latest stuff.

Does this mean my python or environment is a sick puppy?

python -v gump/build.py tsbuild1.xml krysalis-cents-all

'import site' failed; traceback:
ImportError: No module named site
ActivePython 2.2.2 Build 224 (ActiveState Corp.) based on
Python 2.2.2 (#1, Nov 26 2002, 10:26:58)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "gump/build.py", line 15, in ?
    import os.path
ImportError: No module named os.path
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# restore sys.stdin


RE: Python Gump

Posted by Adam Jack <aj...@TrySybase.com>.
	You have not (correctly) installed wxPython.

I guess not. Since I never tried installing it, that explains it. Hopefully
it is some GUI thing I don't need.

	> [build@tsbuild1 python]$ python gump/build.py
	> Traceback (most recent call last):
	>   File "gump/build.py", line 203, in ?
	>     result = run(workspace, ps);
	>   File "gump/build.py", line 39, in run
	>     project=Project.list[projectname]
	> KeyError: krysalis-ruper-test

	It means that

	  1 - you have asked to build krysalis-ruper-test but it's missing
	  2 - you have not asked to build a project, hence it defaults to
	      krysalis-ruper-test

Seems an odd default to pick. ;-)

	Try:
	    python gump/build.py myworkspace.xml the-project-to-build

Ok.

BTW: I seem to have connectivity problems w/ CVS on cvs.apache.org --- so I
think it is dorking these all up. I tried doing a cvs login to ensure I had
your latest, and it just hung...

[build@tsbuild1 python]$ ls ../tsbuild1.xml
../tsbuild1.xml
[build@tsbuild1 python]$ python gump/build.py tsbuild1.xml
krysalis-cents-all
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "gump/build.py", line 15, in ?
    import os.path
ImportError: No module named os.path
[build@tsbuild1 python]$

	What does check.py show?

[build@tsbuild1 python]$ python gump/check.py
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "gump/check.py", line 6, in ?
    import os.path
ImportError: No module named os.path

	And gen.py?

[build@tsbuild1 python]$ python gump/gen.py
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "gump/gen.py", line 67, in ?
    import os.path,os,sys,logging
ImportError: No module named os.path

Adam



Re: Python Gump

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Adam Jack wrote, On 07/05/2003 19.31:
> 	> SET PYTHONPATH=C:\jakarta-gump\python
> 	> CD /d C:\jakarta-gump\python
> 	> python gump\view.py
> 
> [build@tsbuild1 python]$ PYTHONPATH=.
> [build@tsbuild1 python]$ export PYTHONPATH
> [build@tsbuild1 python]$ python gump/gen.py
> [build@tsbuild1 python]$ python gump/view.py
> Traceback (most recent call last):
>   File "gump/view.py", line 75, in ?
>     from wxPython.wx import *
> ImportError: No module named wxPython.wx

You have not (correctly) installed wxPython.

> [build@tsbuild1 python]$ python gump/build.py
> Traceback (most recent call last):
>   File "gump/build.py", line 203, in ?
>     result = run(workspace, ps);
>   File "gump/build.py", line 39, in run
>     project=Project.list[projectname]
> KeyError: krysalis-ruper-test

It means that

  1 - you have asked to build krysalis-ruper-test but it's missing
  2 - you have not asked to build a project, hence it defaults to
      krysalis-ruper-test

Try:
    python gump/build.py myworkspace.xml the-project-to-build

I'll fix the error message and reverse the workspace and project 
definition requirements in the arguments
(python gump/build.py the-project-to-build myworkspace.xml)

Also,

What does check.py show?
And gen.py?

> What ought the graphically challenged (telnet) amongst us do?

You're already helping :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


RE: Python Gump

Posted by Adam Jack <aj...@TrySybase.com>.
	> SET PYTHONPATH=C:\jakarta-gump\python
	> CD /d C:\jakarta-gump\python
	> python gump\view.py

[build@tsbuild1 python]$ PYTHONPATH=.
[build@tsbuild1 python]$ export PYTHONPATH
[build@tsbuild1 python]$ python gump/gen.py
[build@tsbuild1 python]$ python gump/view.py
Traceback (most recent call last):
  File "gump/view.py", line 75, in ?
    from wxPython.wx import *
ImportError: No module named wxPython.wx
[build@tsbuild1 python]$ python gump/build.py
Traceback (most recent call last):
  File "gump/build.py", line 203, in ?
    result = run(workspace, ps);
  File "gump/build.py", line 39, in run
    project=Project.list[projectname]
KeyError: krysalis-ruper-test

What ought the graphically challenged (telnet) amongst us do?

regards

Adam

Re: Python Gump

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Sam Ruby wrote, On 07/05/2003 13.35:
> Leo Simons wrote:
> 
>> Adam Jack wrote:
>>
>>> Is there a readme or something for getting started?
>>
>>
>> http://nagoya.apache.org/wiki/apachewiki.cgi?GumpPython
>>
>> not sure if it still accurate after latest changes.
> 
> 
> It is still fairly accurate.
> 
> Key point is that where most of the action is at the moment is in 
> gumpview.

Yup. If you are also making a new workspace, try running check.py: it 
will tell you in a long report about what projects are missing in the 
definition. For a quick example, run it on my evolving profile, 
PC103.xml (my sysadmin has great fantasy ;-)

> I launch it at the moment with the following:
> 
> SET PYTHONPATH=C:\jakarta-gump\python
> CD /d C:\jakarta-gump\python
> python jakarta-gump\view.py

I guess the last line should read:

  python gump\view.py

That's how I run it too.

<snip/>

Suggestions are very very welcome, features can be added with lightning 
speed :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Python Gump

Posted by Sam Ruby <ru...@apache.org>.
Leo Simons wrote:
> Adam Jack wrote:
> 
>> Is there a readme or something for getting started?
> 
> http://nagoya.apache.org/wiki/apachewiki.cgi?GumpPython
> 
> not sure if it still accurate after latest changes.

It is still fairly accurate.

Key point is that where most of the action is at the moment is in 
gumpview.  I launch it at the moment with the following:

SET PYTHONPATH=C:\jakarta-gump\python
CD /d C:\jakarta-gump\python
python jakarta-gump\view.py

Prereqs are Python and wxPython.  The first time you run it, it takes an 
extra minute or so to download all the external project definitions. 
Subsequent runs load in seconds.

If you select a project, you can walk the project dependencies in both 
directions, see what prereqs aren't installed, see the actual classpath 
and properties used in the ant builds, and see what jars a project 
produces.  One pane initially shows the fully expanded XML project 
definition (implicit dependencies added, properties resolved, etc).

You actually can run a build from this tool.  A typical scenario is to 
select the project that you are interested in, check the prereqs and 
dependencies tabs.  If a dependency failed, you can click on it to go to 
that project.  Press the 'run' icon to build it.  If it succeeds, press 
the 'back' button to return to the project you started with and repeat.

More detailed information on what is being done can be found in the 
console window which you can access by pressing the console icon.

This is still evolving rapidly.  What I like most about it is that 
everything is visible.  I can see immediately what the classpath and 
properties are, and which ones are not likely to be satisfied.  As we 
(primarily NKB and myself at the moment) see more information that would 
be useful, we add it.

- Sam Ruby



Re: Python Gump

Posted by Leo Simons <le...@apache.org>.
Adam Jack wrote:
> Is there a readme or something for getting started?

http://nagoya.apache.org/wiki/apachewiki.cgi?GumpPython

not sure if it still accurate after latest changes.

> F:\data\CommonsVersion\Gump\python>exe.py
> Traceback (most recent call last):
>   File "F:\data\CommonsVersion\Gump\python\exe.py", line 3, in ?
>     import py2exe
> ImportError: No module named py2exe

you need to install py2exe into your gump install for this to work (try 
google ;)

> F:\data\CommonsVersion\Gump\python>gumpconf.pyc

you never want to run .pyc files directly. These are the '.class' for 
the '.py' source, but you normally reference the '.py' and then python 
figure out whether the existing '.pyc' are up-to-date or should not be used.

good luck!

- Leo, Not A Python Expert