On Sep 18, 2007, at 11:11 PM, Ronald Oussoren wrote: > > On 19 Sep, 2007, at 6:31, Boyd Waters wrote: > >> Maybe the user will drag our app bundle to /Applications, but maybe >> not. I can't know where everything is until run-time. >> >> How to I ship the Python framework as a relocatable package inside >> our application? > > You'll have to rewrite the loader commands of at least the command- > line interpreter. I guess the easiest way to do that is to use > a .app bundle and macho_standalone (part of macholib): Create a > (dummy) .app bundle by hand and use sys.executable (not the python > command) as the executable of that application bundle. Then use > macho_standalone to copy all libraries and frameworks used by the > application into the application bundle, this will rewrite the > loader commands as well.
Thanks very much, Ronald! Not sure I understood all that, but I know where to dig now... I see this in the comments in Modules/main.c: > See Lib/plat-mac/bundlebuiler.py for details about the bootstrap > script. I had thought this was a trivial matter, but now I see that it is a bit involved. Our application already sets up the Python interpreter from a C++ wrapper, so I suppose we already have a place to add hooks. Hmm. If I come up with anything simple and clever, I'll post back to the list. (If I come up with something embarrassing and stupid, maybe I'll keep it to myself...) - boyd Boyd Waters programmer mac guy National Radio Astronomy Observatory http://www.aoc.nrao.edu/~bwaters _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig