[Pythonmac-SIG] py2app Enforces Directory Structure?
Erik Westra
ewestra at gmail.com
Thu Dec 23 01:31:06 CET 2004
Hi Bob,
> I just wanted to mention that there are designated places to put files
> like that, and "relative to wherever the application might be" is Not
> That Place. See the "Where To Put Application Files" section of `The
> Mac OS X File System`__.
Thanks for pointing me in the right direction. I've had a detailed
read, and thought about this and discussed it with my boss somewhat.
While this is too radical a step to take right now, I have changed our
system so that the placement of the data files can be changed in the
future simply by changing one function within a utility module
(previously, all references to data files used os.path.join("..",
"dir", "filename"), hardwiring the directory placement, which was
awful). At present, I've set this function up to work the "bad" way
you described in one of your earlier E-Mails on this topic -- by
accessing the data relative to the application bundle itself. But if
I can convince the others in our company that it's a good idea, I can
easily change this in future by changing that one data-access
function, so that, for example, all the app's data is stored in a
sub-directory within ~/Library/Application Support.
Anyway, enough on this. I just wanted to thank you for the fantastic
work you've done on py2app. I'm amazed -- I've packaged our company's
various applications to work under Linux and Windows, using both the
MacMillan Installer and py2exe, and py2app is by far the most
trouble-free solution I've ever found (once you helped me out with
getting sibling modules importing correctly). The system I bundled up
last night makes heavy use of wxPython, docutils, PIL, pySQLite, and
ReportLab -- and it all works perfectly right out of the box. The
generated application is slightly bigger than the Windows version (the
compressed disk image is 11 megs, compared with 8 megs for the
equivalent installer under Windows), but that's acceptable. I can't
believe that py2app simply handled all the dependencies and
complexities of these various tools right out of the box.
Keep up the great work! And thanks again...
- Erik.
More information about the Pythonmac-SIG
mailing list