Question

I have Mercurial 1.3 installed on my Windows 7 machine. I don't have python installed, but Mercurial seems to be OK with that.

How does it work?

Also, is it possible to force Mercurial run on IronPython and will it be compatible?

Thank you.

Was it helpful?

Solution

The Mercurial windows installer is packaged using py2exe. This places the python interpreter as a DLL inside of a file called "library.zip".

On my machine, it is placed in "C:\Program Files\TortoiseHg\library.zip"

This zip file also contains the python libraries that are required by mercurial.

For a detailed description of how mercurial is packaged for windows, see the developer page describing building windows installer.

OTHER TIPS

Since there is a "library.zip"(9MB), Mercurial's Windows binary package maybe made by py2exe, py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation.

Others have answered the first question -- let me give a guess about the second part.

Mercurial will normally use some C extensions for speed. You cannot use those with IronPython.

But we also ship pure Python versions of these modules, and depending on how much IronPython implements of a standard Python 2.4 environment, those modules could be compatible. I have seen reports on IRC about Jython (the Java port of Python) being able to do a few operations using the pure modules. You should download Mercurial and take a look at the mercurial/pure folder. These modules simply has to be moved up one directory level to be found, the setup.py script can do this if you pass the --pure flag. Please see its source or come talk with us on the Mercurial mailinglist/IRC.

Mercurial bundles the necessary python binaries within it, I believe.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top