[Pythonmac-SIG] py2app Enforces Directory Structure?
ewestra at gmail.com
Wed Dec 22 05:39:50 CET 2004
Wow -- that was fast!
> "build" sure is a dangerous name to use, considering that it's
> typically the name of a scratch directory in Python terms.
Thanks...I wasn't aware of that.
> setup.py assumes that it can find all of the dependencies via normal
> import mechanisms. If you want it to work in your situation, you will
> have to add your "frameworks" directory to sys.path before setup(...) -
> see below. This sys.path modification will no longer be necessary as
> of py2app 0.1.7 (fixed in svn r268).
Brilliant! I was hoping there might be some way of getting this working...
> > I don't need to
> > include anything else in the application, as the system will store the
> > contents of the "data" and other directories outside of the
> > application bundle itself.
> Don't do that. That's bad. Include the data and any other
> dependencies inside the application. Having them external and using an
> installer is not the Mac way to do things and I'm not going to help you
> do it. There was a similar discussion a while ago (weeks?) and I'm not
> going to have it again, so search the archives and argue with the past
> if you feel strongly in the other direction :)
I agree that this isn't something worth arguing about (and I wouldn't
expect you to help me do it, either!), but I just have one comment on
this issue: in the system I'm porting to the Mac, the "data" might
consist of 300+ megabytes of information held in an embedded SQLite
database, along with hundreds of configuration files and
dynamically-loaded Python modules (downloaded automatically from a web
site as they are required). Our system is pretty darned complicated,
and while I agree that it's not the Mac way of doing things, the
architecture works well and our users really don't care much about the
internal organisation. This isn't an application designed for mass
distribution, so issues like this really aren't all that important to
Anyway, topic closed. I certainly don't want to get into an argument
> from distutils.core import setup
> import py2app
> import sys
> # no longer necessary in 0.1.7
> sys.path.insert(0, '../framework')
> app = ["../framework/main.py"],
> data_files = ['../data'],
> % cd build
> % python setup.py py2app
> If you check out py2app trunk
> <http://svn.red-bean.com/bob/py2app/trunk> (as of revision 268), then
> the sys.path.insert(0, '../framework') is no longer necessary, and
> there is an example
> setup.py> that demonstrates the given use case (minus the bad form of
> having external data files).
Thanks for the great (and speedy) help!
More information about the Pythonmac-SIG