Hackable Mercurial: Can't Compile hg.exe

Adrian Buehlmann adrian at cadifra.com
Thu Apr 17 14:44:22 CDT 2014


On 2014-04-17 20:40, Jensen, Aaron wrote:
>>> Yes. I think it has regressed since the wiki page was made ... but I 
>>> have no evidence. I think the current exe wrapper was designed to 
>>> assume that the python directory with its DLLs is in PATH where it can 
>>> contribute to DLL hell for all the apps you launch.
>>
>> I think it should all be pretty straightforward.
>>
>> See also http://selenic.com/repo/hg/rev/93d97a212559
>> and the C source for hg.exe in exewrapper.c
> 
> It looks like my install of Pythong 2.7.6 didn't come with a python27.dll, or any python*.dll. There are only sqlite3.dll, tix84.dll, tk85.dll, tcldde13.dll, tclpip85.dll, tclreg12.dll, tcl85.dll. Did Python stop shipping with that assembly? Is there a special download package/installer I need to grab? I downloaded 2.7.6 x86 from https://www.python.org/download/releases/2.7.6 .

I think the official Python msi installers have a "install globally"
option (or something to that effect - it's been quite a while since I
have played with that kind of stuff...).

If you used said install method, I think it should have installed the
dll in a place like C:\Windows\System32 (for example, I do have a
python27.dll there on my Windows 7 x64 box) - a directory which is
always "searched" for dlls on Windows (so it is indeed global).

You can install multiple major Python versions like that in parallel
(i.e. Python 2.6, 2.7 etc), also x86 and x64 variants of the same major
Python version in parallel on the same x64 Windows box.

The hg.exe built should be able to *also* use a globally installed
Python (see commit message of 93d97a212559). Each hg.exe built is
strictly bound to a specific major Python version (e.g. 2.7). The major
version used is implied by the python.exe you used when calling setup.py.

Of course exewrapper.c should also support the other install methods as
defined in the source (e.g. hg-python directory next to hg.exe for
"HackableMercurial").

(I do hope this is all correct, it's been quite a long time since I have
been hacking on these things...)




More information about the Mercurial-devel mailing list