[Pythonmac-SIG] best way to install packages?

Ronald Oussoren ronaldoussoren at mac.com
Fri Feb 3 19:50:03 CET 2006


On 3-feb-2006, at 18:59, Christopher Barker wrote:

> Andrew Jaffe wrote:
>> 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)
>
> The "Best" way to install packages is to use whatever form you get. If
> you get an egg, use easy-install, if you get a mpkg, point and  
> click it,
> if you the source, use setup.py.
>
> I'm not just being glib here. I wonder if you, in fact, are asking a
> larger question, which it would be nice to discuss here:
>
> What is the best way to distribute packages? Now you have to consider
> the three options above:
>
> 1) Just distribute the source with a setup.py
> 2) Use bdist_mpkg to build a mpkg
> 3) Build and egg.
>
> The reason I make this distinction is that if you are getting just the
> source from a package maintainer, there is little reason to go though
> the trouble of making mpkgs or eggs, if you only want to install it on
> your own machine. slight modification to that:
>
> The is no reason to make a mpkg.
>
> You might want to make an egg, so that you can get the versioning
> control eggs give you (and some other features, but versioning control
> is the big one) However, if it's just for your purposes, and the  
> package
> maintainer hasn't set up setup.py to build and egg, it's probably not
> worth it.

Even more important that versioning is that eggs give you an easy way
to uninstall software (although I'm not quite sure about scripts). The
normal distutils makes it very hard to uninstall some packages because
they install multiple toplevel packages and it is not always immediately
obvious which files they install.

>
> That being said, I would love it if EVERYONE that downloads and  
> builds a
> source package on their Mac would contribute a binary package to the
> community. Mac users like binary packages!
>
> I suggest the following for making a package that can be distributed:
>
> - Make an egg.
> - If you can't figure out how to make an ebb, use bdist_mpkg
> - I think Bob is working on making py2app support eggs with  
> bdist_mpkg,
> so that may get easy.
>
> However, keep in mind that when you make a binary package, it will  
> only
> work (reliably) with the version of Python that you build it with. I
> think the versions we should support are:
>
> Bob's "official unofficial" 2.4.1 framework build for 10.3 (this will
> run on 10.4 also)
>
> 2.4.1 framework build for 10.4

Don't. There should be only one binary installation of Python 2.4.x  
for every
x and than one should work on 10.3 and 10.4. This makes live a lot  
easier
for causual users.

>
> There's something to be said for supporting Apple's pythons but I  
> think
> that's lower priority.
>
> And these packages should be put up on pythonmac.org
>
> One other note:
>
> The Framework builds put the "bin" directory inside the Framework.
> That's where scripts get installed by default. What that means is that
> in order to use them, the user needs to add that directory to their
> PATH. This isn't a big deal, but it reminds me too much of the old DOS
> days, where you needed to add something to your PATH for every darn
> piece of software you installed. I much prefer the *nix standard of
> having a few locations where executables get installed, and I's  
> like to
> see the default scripts directory be /use/local/bin.

BTW. modern unix systems assume that additional software will bin  
installed
in directories below /opt, such as /opt/python2.4, /opt/gnome, ....

I'd prefer /Library/Python/2.x/bin as the directory where scripts get  
placed
because that directory is easily visible in the Finder and allows you  
to install
software for both python2.3 and python2.4. I regularly do that to  
make it easier
to install software using older versions of python.

>
> Should this be the standard? How could we accomplish that? Or  
> should we
> just tell people to add the Framework bin directory to their PATH.

The bin directory inside the framework is a bit to hidden for most users
and hard to get to using the Finder.

>
> Mostly I feel strongly that, as a community, we need to establish
> standard ways of doing Python on OS-X, and publish them somewhere. I'm
> not picky about what those standards are, as long as they exist.

I'll  defer to any standard once it is here :-). Feel free to write a  
proposal about a standard, including what needs to be done to get  
there ;-)

Off to hack on another universal python build,

	Ronald

>
> -Chris
>
>
>
> -- 
> Christopher Barker, Ph.D.
> Oceanographer
>                                      		
> NOAA/OR&R/HAZMAT         (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2157 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20060203/69a3709c/attachment-0001.bin 


More information about the Pythonmac-SIG mailing list