[New-bugs-announce] [issue2641] setuptools gets site-packages wrong on Mac

Jason Orendorff report at bugs.python.org
Tue Apr 15 22:34:36 CEST 2008

New submission from Jason Orendorff <jason.orendorff at gmail.com>:

On my Mac, /usr/local/bin/python2.5 is a symlink to

When I install Mercurial from source, the "mercurial" package is
installed at "/usr/local/lib/python2.5/site-packages/mercurial", so the
installation is broken.  Since "site-packages" appears nowhere in the
Mercurial source tree, I think it's setuptools (not Mercurial) that is
getting this wrong.

Mercurial's setup.py can be seen here:

(as of this writing)

(the latest)

I'm not sure what the Right Thing would be, but if it's agreed that the
current behavior is a hack, then `(p for p in sys.path if
p.endswith('site-packages')).next()`, falling back to the current
behavior, seems like a better hack.

Happy to patch, if someone can advise me; MvL?

components: Distutils
messages: 65527
nosy: jorendorff
severity: normal
status: open
title: setuptools gets site-packages wrong on Mac
versions: Python 2.4, Python 2.5

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list