[PATCH STABLE] setup: fix build_hgexe for mingw32 compiler

Adrian Buehlmann adrian at cadifra.com
Sat Jul 28 13:10:29 CDT 2012


On 2012-07-28 18:50, Patrick Mézard wrote:
> Le 28/07/12 18:22, Adrian Buehlmann a écrit :
>> On 2012-07-28 17:46, Patrick Mézard wrote:
>>> Le 25/07/12 16:50, Adrian Buehlmann a écrit :
>>>> # HG changeset patch
>>>> # User Adrian Buehlmann <adrian at cadifra.com>
>>>> # Date 1343227822 -7200
>>>> # Branch stable
>>>> # Node ID 450330d3276f34576b98fd2d940c257f4bdef73b
>>>> # Parent  ffc49100151b68c0bcd061b900d9993e9e1a0d7d
>>>> setup: fix build_hgexe for mingw32 compiler
>>>>
>>>> Fixes
>>>>
>>>>   python setup.py build_hgexe -i --compiler=mingw32
>>>
>>> This is not exactly related to this patch but to exewrapper, but I would like to mention we had to tweak the existing Windows buildbot setup to have it run with exewrapper. The errors were:
>>>
>>>   http://hgbuildbot.kublai.com/builders/Windows%202008%20R2%20hg%20tests%20(stable)/builds/94/steps/run-tests.py%20(python2.6)/logs/stdio
>>>
>>> and the fix was to explicitely set $PYTHONHOME to the python interpreter used to build and run the tests. I do not know why PYTHONHOME helped here as the referenced python interpreter was already the first in $PATH (there is at least another global one installed on the box), but it helped.
>>>
>>> Is it the symptom of possible problems with exewrapper or the test suite, I do not know.
>>
>> I'm wondering if it would have helped to mimick exemaker's
>>
>> https://bitbucket.org/timeless/exemaker/src/385eaa517487/exemaker.c#cl-283
>>
>> with something like
>>
>> diff --git a/mercurial/exewrapper.c b/mercurial/exewrapper.c
>> --- a/mercurial/exewrapper.c
>> +++ b/mercurial/exewrapper.c
>> @@ -82,6 +82,7 @@
>>         }
>>         n = 0;
>>         pyargv[n++] = argv[0];
>> +       pyargv[n++] = "-S"; /* don't import site just yet */
>>         pyargv[n++] = pyscript;
>>
>>         /* copy remaining args from the command line */
> 
> Nope, does not help on the buildbot.

Thanks for checking and for fixing the build bot.

http://stackoverflow.com/questions/1387906/c-with-python-embedding-crash-if-python-not-installed

has a nice explanation by Martin v. Löwis.

It looks like finding the Python libs is one of the weak spots when
doing a hg.exe.



More information about the Mercurial-devel mailing list