Installing Mercurial on Mac OS X 10.6 Snow Leopard

Posted by Matthew Rankin on Stack Overflow See other posts from Stack Overflow or by Matthew Rankin
Published on 2009-09-22T17:13:09Z Indexed on 2010/04/02 5:13 UTC
Read the original article Hit count: 393

Filed under:
|
|
|
|

Installing Mercurial on Mac OS X 10.6 Snow Leopard

I installed Mercurial 1.3.1 on Mac OS X 10.6 Snow Leopard from source using the following:

cd ~/src
curl -O http://mercurial.selenic.com/release/mercurial-1.3.1.tar.gz
tar xzvf mercurial-1.3.1.tar.gz
cd mercurial-1.3.1
make ALL
sudo make install

This installs the site-packages files for Mercurial in /usr/local/lib/python2.6/site-packages/. I know that installing Mercurial from the Mac Disk Image will install the files into /Library/Python/2.6/site-packages/, which is the site-packages directory for the Mac OS X default Python install.

I have Python 2.6.2+ installed as a Framework with its site-packages directory in:

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages

With Mercurial installed this way, I have to issue:

PYTHONPATH=/usr/local/lib/python2.6/site-packages:"${PYTHONPATH}"

in order to get Mercurial to work.

Questions

  • How can I install Mercurial from source with the site-packages in a different directory?
  • Is there an advantage or disadvantage to having the site-packages in the current location? Would it be better in one of the Python site-package directories that already exist?
  • Do I need to be concerned about virtualenv working correctly since I have modified PYTHONPATH (or any other conflicts for that matter)?

Reasons for Installing from Source

Dan Benjamin of Hivelogic provides the benefits of and instructions for installing Mercurial from source in his article Installing Mercurial on Snow Leopard.

© Stack Overflow or respective owner

Related posts about python

Related posts about mercurial