Re: jhbuild error

Biswapesh Chattopadhyay wrote:

On Thu, Dec 19, 2002 at 02:46:57PM +0530, Biswapesh Chattopadhyay wrote:
Can anyone tell me how to fix this (happens when I run jhbuild):

 File "/opt/gnome/src/jhbuild/", line 142
   module_list = [ module_set.modules[modname] for modname in args ]

This is fresh checkout of jhbuild from CVS.
That is not the full error message it gives you (for example, the last
line will be the type of exception thrown and maybe an explanatory
string). Can you post the full error message, please?
There si just a 'syntax error' line after this:
 File "/opt/gnome/src/jhbuild/", line 142
   module_list = [ module_set.modules[modname] for modname in args ]
SyntaxError: invalid syntax

That line is a list comprehension, which is a feature added in Python 2.0 (released a bit over 2 years ago). I will add a check to make sure installing jhbuild picks an appropriate Python in the future.

Does anyone have a problem with jhbuild requiring a version of Python newer than 1.5.2? The newer versions of Python allow writing signficantly cleaner code, so I would prefer not to code to the lowest common denominator. The list comprehensions can be rewritten with map/lambda, but they end up looking more messy than list comprehensions if you can't rely on nested scopes (which were implemented in an even newer Python).

Also, better mention what platform you are using and which version of
RH 7.3 Python version 1.5.2. But I've tried with python2 and python2.2.
They just give errors at different places. With python2:
Traceback (most recent call last):
 File "/opt/gnome/src/jhbuild/", line 22, in ?
   import module
 File "/opt/gnome/src/jhbuild/", line 52, in ?
   class CVSModule(Package):
 File "/opt/gnome/src/jhbuild/", line 84, in CVSModule
   def do_checkout(self, buildscript, force_checkout=False):
NameError: name 'False' is not defined

With python2.2, it's the same as python2.
In the new code I have been writing in jhbuild, I made use of the True and False constants which were introduced for Python 2.3, and backported to Python 2.2.1. I put in some compatibility code in to make it work with older versions, but it looks like it doesn't get run early enough. I will check in a fix for this tonight, but if you want to fix your local copy edit and move the import of module and moduleinfo below the block that sets __builtins__.True and False.

Thanks for the bug report.


Email: james daa com au              |
WWW: | Jan 22-25 Perth, Western Australia.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]