[Pythonmac-SIG] best way to install packages?

Bob Ippolito bob at redivi.com
Fri Feb 3 18:09:27 CET 2006


On Feb 3, 2006, at 8:57 AM, Andrew Jaffe wrote:

> I originally posted this in a different thread, but I realize that the
> first post was about 10 levels deep, so possibly ignored by people who
> might care or be able to help (or possibly just ignored as a dumb
> question). Anyway, is there a 'best' way to install python packages  
> on a
> mac nowadays? It seems that there at least three possibilities:
>
>    - plain old setup.py install
>    - bdist_mpkg
>    - eggs (in which case I realize I'm not sure I know exactly  
> *how* to
> do this)
>
> I've been using bdist_mpkg a lot recently, but this discussion is  
> making
> me think it may not the preferred way. Any opinions? (There was one
> answer in favor of plain-old setup.py install.)

Whichever one works.

setup.py install works for everything, but you might need to specify  
--install-scripts in order to make the scripts get installed to a  
useful location.  bdist_mpkg does that for you.

Some packages are dumb and don't really use distutils, like Twisted,  
so bdist_mpkg doesn't work everywhere.

setuptools is a bit more sensitive to distutils abuse and definitely  
doesn't like Twisted, but also doesn't like some other packages like  
Zope.Interface (IIRC).  If you want to learn more about setuptools  
from a user's perspective, read the EasyInstall documentation.  If  
you want to learn about it from a developer's perspective, read the  
setuptools and PkgResources documentation.

http://peak.telecommunity.com/DevCenter/EasyInstall
http://peak.telecommunity.com/DevCenter/setuptools
http://peak.telecommunity.com/DevCenter/PkgResources

Personally, I've been using setuptools for everything lately because  
it deals with a few issues like dependencies and development  
builds.    It's not yet ready for everyone all the time, but it's  
clearly the future.

-bob



More information about the Pythonmac-SIG mailing list