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