Hi,
Building the mercurial packages for windows is very complicated.
- Install python 2.6.x
- Install Mercurial xxx Python 2.6 package - x86 Windows
- Create new folder for the package
- Copy the python installation to the folder
- unzip the library.zip of the mercurial installation to a subfolder
of the package folder
- copy the templates folder from the mercurial folder into the
extracted library folder
- copy the files msvcm90.dll, msvcp90.dll, msvcr90.dll and
Microsoft.VC90.CRT.manifest from the mercurial installation into the
root of the new python folder
- create start scripts for mercurial, hg.bat:
@echo off
setlocal
set HG=%~f0
set PYTHONHOME=%~dp0..\..\..\python\2.6.6
set PYTHONPATH=%~dp0..\lib
"%PYTHONHOME%\python.exe" "%~dp0hg.py" %*
exit /b %errorlevel%
- hg.py:
# mercurial - scalable distributed SCM
#
# Copyright 2005-2007 Matt Mackall <
m...@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import os
import sys
libdir = '../lib/python2.6/site-packages/'
if libdir != '@' 'LIBDIR' '@':
if not os.path.isabs(libdir):
libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)),
libdir)
libdir = os.path.abspath(libdir)
sys.path.insert(0, libdir)
# enable importing on demand to reduce startup time
try:
from mercurial import demandimport; demandimport.enable()
except ImportError:
import sys
sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" %
' '.join(sys.path))
sys.stderr.write("(check your install and PYTHONPATH)\n")
sys.exit(-1)
import mercurial.util
import mercurial.dispatch
# for fp in (sys.stdin, sys.stdout, sys.stderr):
# mercurial.util.set_binary(fp)
mercurial.dispatch.run()
- You have to the mercurial python files for .pyo extensions, if there
are pyo files than you have to enable the optimized bytecode checkbox
in scm-manager
At the end you should have a directory structure like this:
hg/x.x.x/bin
hg/x.x.x/lib
python/x.x.x/
Sebastian
2012/6/11 Bryan Cook <
bryan.co...@gmail.com>: