RFC: Alternative for exemaker

Adrian Buehlmann adrian at cadifra.com
Thu Jun 28 17:25:57 UTC 2012


On 2012-06-28 18:48, Adrian Buehlmann wrote:
> FWIW, I've started hacking a bit on trying to get it compiled to an exe with
> 
>   $ python setup.py build

I got a working hg.exe in build/temp.win-amd64-2.7/Release with (in
setup.py):


class buildhgexe(build_ext):
    description = 'compile hg.exe from hg.c'

    def build_extensions(self):
        objects = self.compiler.compile(['hg.c'],
                                         output_dir=self.build_temp)
        self.compiler.link_executable(objects, 'hg',
                                      output_dir=self.build_temp)


Relevant output seen in terminal:


running build_hgexe
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe
/c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python\include -IC:\Python\PC
/Tchg.c /Fobuild\temp.win-amd64-2.7\Release\hg.obj
hg.c
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe
/nologo /INCREMENTAL:NO /LIBPATH:C:\Python\libs /LIBPATH:C:\Python\PCbuild
\amd64 build\temp.win-amd64-2.7\Release\hg.obj
/OUT:build\temp.win-amd64-2.7\Release\hg.exe
/MANIFESTFILE:build\temp.win-amd64-2.7\Release\hg.exe.manifest
C:\Program Files\Microsoft SDKs\Windows\v7.0\bin\x64\mt.exe -nologo
-manifest build\temp.win-amd64-2.7\Release\hg.exe.manifest
-outputresource:build\temp.win-amd64-2.7\Release\hg.exe;1


So I think I might be pretty close.



More information about the Mercurial-devel mailing list