[Pythonmac-SIG] Distributing Python applications for the Mac
Jack Jansen
Jack.Jansen at cwi.nl
Sun Jan 4 18:01:34 EST 2004
On 4-jan-04, at 14:23, Konrad Hinsen wrote:
> Having regular access to a Mac now, I would like to prepare
> Mac-friendly
> distributions of my scientific applications, all written in Python.
> The goal
> is to make them available to users who don't know nor care much about
> Python,
> so the installation procedure should be as simple as possible.
Konrad,
if you really mean "applications", as in turnkey standalone things to
be run by end users, the neither fink nor Package Manager are the best
solution to your problem.
What I think the best solution would be is to first package your
application with everything it needs. Bundlebuilder is the tool you
want to look at for this, it packages everything up into a single
".app" bundle, which looks like one file to the end user. There's one
slight problem: if you want your applications to run on both 10.2 and
10.3 you will have to create it on 10.2 right now. Create the
application with --standalone, and it will include everything it needs,
including all the bits of Python that you use. If 10.3 only is good
enough: create the application on 10.3 and *don't* use --standalone,
and it will use the standard MacPython that Apple supplies. The app
will be quite a bit smaller too. You can create 10.2-compatible apps on
10.3, but it is a bit difficult right now.
Even if your applications are programs to be run from a Terminal window
I think I would use bundlebuilder, after hacking the bootstrap script
that it uses to run Python in a Terminal window in stead of directly.
After you've created your application the standard "installer" for
MacOSX is simply a disk image with the application: people drag and
drop it to where they want to have it. If your installer needs to do
more you can look at either Apple's PackageMaker tool, or the somewhat
equivalent Mac/scripts/buildpkg.py script in a Python source
distribution.
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
More information about the Pythonmac-SIG
mailing list