Running Mercurial on Cygwin and Python 2.2 compatibility
Thomas Arendsen Hein
thomas at intevation.de
Thu May 12 07:06:50 UTC 2005
* Matt Mackall <mpm at selenic.com> [20050512 01:59]:
> On Wed, May 11, 2005 at 07:42:08PM -0400, Ren? Rh?aume wrote:
> > I also tried on my old Mandrake Linux 9.0 based system, which has Python
> > 2.2.1. It complained that "yield" would become a keyword in future
> > versions of Python.
>
> I believe the current bzr code has some smarts for finding the right
> Python at runtime or bailing with a useful error message, if someone
> wants to scavenge that for me. I think there are some other 2.3isms
> lurking besides yield and I'd rather not remove them.
You can add yield support to python2.2.1 with:
from __future__ import generators
before importing anything else, but there are other things.
You don't need some algorithm to find a suitable python at runtime,
this can be handled by distutils while installing. Just call
setup.py with the desired interpreter, e.g.:
python2.3 ./setup.py install --prefix=$HOME
Distutils will automatically place the full path to the used
interpreter in the #!-line for hg.
Though python2.2 support would be nice for Debian Woody, too.
Thomas
--
Email: thomas at intevation.de
http://intevation.de/~thomas/
More information about the Mercurial
mailing list