[Pythonmac-SIG] best way to install packages?
Christopher Barker
Chris.Barker at noaa.gov
Fri Feb 3 18:59:07 CET 2006
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.
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
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.
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.
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.
-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
More information about the Pythonmac-SIG
mailing list