On Nov 20, 2004, at 6:48 PM, Kevin Walzer wrote:
Bob Ippolito wrote:
|Thanks for clarifying this. I used PythonIDE to generate the applet
bundle, and never noticed that it created this dependency. I'm assuming
that since it's only being maintained, not developed, that there are
probably no plans to change this. I notice that PyOXIDE sets things up
the way you suggest, so I will probably switch to that in the next version.
Question, though: aren't PythonLauncher and pythonw part of the
MacPython distribution? Would a Python app bundle launch correctly if
these tools weren't installed? Or are they part of the stock Apple build
of Python?
They are included on a stock Mac OS X 10.3+ machine:
/System/Library/Frameworks/Python.framework/Versions/2.3/Resources/ PythonLauncher.app
/usr/bin/pythonw
The MacPython additions mostly just install the _waste extension module and creates a bunch of application bundles or aliases in your application folder. The code behind these applications is basically already installed, though.
I realize that using applets as the basis for my app bundles isn't
really the best way to do it, but it does work if the supporting
libraries (PyQt, tkinter, wxPython, whatever) are installed. I do plan
to spend more time with py2app learning its ins and outs--a lot of it is
over my head right now--because I know, overall, that it's a better way
to distibute Python applications (more complexity on the developer end,
but a lot less on the end user).
Using py2app is only as complex as your requirements. py2app comes with a BuildApplet equivalent where you just drag a source file, icon, Info.plist, resources, etc. and it figures out a reasonable thing to do from there. I can't imagine how it could get any easier. The most important feature, of course, is that it actually does what you want a heck of a lot more often than BuildApplet will. This applet is installed as:
/Developer/Applications/Python\ Tools/py2app/py2applet.app (if you are using the .pkg installer of 0.1.5 that I posted).
If you want to distribute applications that *require* preinstalled components, then you would do something like python setup.py --site-packages --excludes=wx,wxPython (UNTESTED).. but that's obviously not useful very often. By default, the user's site-packages is removed from sys.path, so that your application launches in a deterministic environment that's much easier to test against (you'll quickly see if it missed anything due to hidden imports). --site-packages turns this feature off, which is necessary when you want to depend on existing components (that are installed to the normal place, anyway).
Incidentally, PyQt would be a lot harder to exclude, because it's poorly designed and just throws a whole mess of modules into the root of your site-packages.
-bob
_______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
