[Distutils] Re: Distutils under Mac OS

Greg Ward gward@python.net
Thu Sep 14 22:04:01 2000


[cc'ing the SIG again, for the same reason]

On 13 September 2000, Corran Webster said:
> At the moment to install you have to use the command line interface - 
> you can't just double click on setup.py.  What Greg is saying is that 
> one way to avoid this on the mac side is to have some version of the 
> bdist command which builds an intelligent installer of some sort (for 
> example, it may bundle everything up into a VISE installer) which 
> then puts everything in the right place.

That only helps installers -- see my previous post for a possible way to
help all Distutils users (developers and packagers too).

> I can see two slightly simpler ways of dealing with this.  The 
> easiest to implement is to have an applet which you can just drop 
> setup.py files on and it handles everything from there (easy to do 
> thanks to the "run_setup" function - I have a 5 line applet which 
> does this now).  This "Install package" applet could be added to the 
> standard mac distribution of Python much like the "Build applet" and 
> "Build application" applets are now.

Hmm, neat idea.  You could even make your "Install package" applet smart
enough to unpack a Distutils-style archive and dig up setup.py there --
just download a source release off the net, drop it onto the applet, and
away-we-go.  How's *that* for ease of use?  ;-)

> A slightly more sophisticated approach would be to have a bdist-type 
> command which creates an installer applet for the package, and then 
> bundles everything up in a zip/tar/stuffit file.  All the end users 
> would just unpack the archive and run the applet and it would take 
> care of everything automatically.

That might be more sophisticated, but it sounds inferior to the previous 
option in usability terms: the user has to unpack the archive and "do
something" with what he finds there.

> An even more sophisticated approach would bundle everything up using 
> zip/tar/stuffit and then store the data inside a python script 
> somehow (a really big string?).  This script would know how to unpack 
> and install the archived data. This script would then be turned into 
> an applet (or even a standalone application) and distributed - 
> essentially making a pure python poor man's version of VISE.

This is essentially what Thomas Heller's bdist_wininst does, except the
wrapper is a C program -- really a self-expanding ZIP file with a bit of
GUI to make it look pretty.  Despite the fact that I have to carry
around C source and a Windows .exe in the Distutils CVS and source
distribution, this strikes me as more elegant than making a big Python
script with a little bit of code and a lot of encoded
ZIP/StuffIt/whatever data.

> The most sophisticated would be to package everything up in a VISE 
> Installer.  Jack would know far more than I about how 
> possible/practical that would be.

The original idea for Windows was to generate WISE installers.  (Any
relation to VISE?)  The impetus for this has dropped off with the
success of the bdist_wininst command; it sounds like not many module
distributions need the sophistication of a full-blown commercial
installer.  I suspect the same would hold on Mac OS.

However, when it comes time to deal with full-blown Python applications, 
we may have to reexamine the issue.

Again, I'll deal with header file installation in a separate post.

        Greg
-- 
Greg Ward                                      gward@python.net
http://starship.python.net/~gward/