bos@85: \chapter{Installing Mercurial from source} bos@85: \label{chap:srcinstall} bos@85: bos@85: \section{On a Unix-like system} bos@85: \label{sec:srcinstall:unixlike} bos@85: bos@85: If you are using a Unix-like system that has a sufficiently recent bos@85: version of Python (2.3~or newer) available, it is easy to install bos@85: Mercurial from source. bos@85: \begin{enumerate} bos@85: \item Download a recent source tarball from bos@85: \url{http://www.selenic.com/mercurial/download}. bos@85: \item Unpack the tarball: bos@85: \begin{codesample4} bos@85: gzip -dc mercurial-\emph{version}.tar.gz | tar xf - bos@85: \end{codesample4} bos@85: \item Go into the source directory and run the installer script. This bos@85: will build Mercurial and install it in your home directory. bos@85: \begin{codesample4} bos@85: cd mercurial-\emph{version} bos@85: python setup.py install --force --home=\$HOME bos@85: \end{codesample4} bos@85: \end{enumerate} bos@85: Once the install finishes, Mercurial will be in the \texttt{bin} bos@85: subdirectory of your home directory. Don't forget to make sure that bos@85: this directory is present in your shell's search path. bos@85: bos@85: You will probably need to set the \envar{PYTHONPATH} environment bos@85: variable so that the Mercurial executable can find the rest of the bos@85: Mercurial packages. For example, on my laptop, I have set it to bos@85: \texttt{/home/bos/lib/python}. The exact path that you will need to bos@85: use depends on how Python was built for your system, but should be bos@85: easy to figure out. If you're uncertain, look through the output of bos@85: the installer script above, and see where the contents of the bos@85: \texttt{mercurial} directory were installed to. bos@85: bos@85: \section{On Windows} bos@85: bos@85: Building and installing Mercurial on Windows requires a variety of bos@85: tools, a fair amount of technical knowledge, and considerable bos@85: patience. I very much \emph{do not recommend} this route if you are a bos@85: ``casual user''. Unless you intend to hack on Mercurial, I strongly bos@85: suggest that you use a binary package instead. bos@85: bos@85: If you are intent on building Mercurial from source on Windows, follow bos@85: the ``hard way'' directions on the Mercurial wiki at bos@85: \url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall}, bos@85: and expect the process to involve a lot of fiddly work. bos@85: bos@85: %%% Local Variables: bos@85: %%% mode: latex bos@85: %%% TeX-master: "00book" bos@85: %%% End: