Re: [Pyobjc-dev] Detecting Python interpreters on startup
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-09-06 11:08:41
|
Dinu Gherman wrote: > #! /usr/bin/env python > > import os > from bundlebuilder import buildapp > > src = [ fn for fn in os.listdir('.') > if fn.endswith('.py') and fn not in ('buildapp.py',) ] > > buildapp( > name = "TestTest2", > mainprogram = "__main__.py", > resources = ["English.lproj"] + src, > nibname = "MainMenu", > ) Btw, you don't *need* to include all sources from "." as resources, _as_long_as_ you either use --standalone or --link. With --link, you basically create an applet that contains symlinks to everything you specify, so it's very much tied to your setup. But: also the main .py program is symlinked, and with the way Python handles the main script, it turns out the the directory of the _original_ main script (not the dir that contains the symlink!) gets on sys.path. So things "just work". (But the truly best thing about --link is that you don't have to rebuild your app(let) when you edit sources or nibs!) And with --standalone, modulefinder.py will pick up the needed modules anyway, so you *also* don't need to add your other modules to the resources list. In retrospect, I find the option-less "python buildapp.py build" invocation pretty useless. I personally never use it. Time to write documentation! :) Just |