On Jul 12, 2005, at 6:59 PM, Phillip J. Eby wrote:
At 06:42 PM 7/12/2005 -1000, Bob Ippolito wrote:
On Jul 12, 2005, at 6:28 PM, Phillip J. Eby wrote:
At 05:29 PM 7/12/2005 -1000, Bob Ippolito wrote:
Well, just do the second suggestion then. "Install" the eggs somewhere, unzipped, and make sure it's on sys.path during setup.py. Maybe you could crank the ez_setup wheels (or whatever module is appropriate, I haven't looked at eggs yet) at the top of your setup.py and automate this.
Well, if it just has to be on sys.path during setup.py, then it should be working now, shouldn't it? I mean, if he installed them to Python's site-packages. In the alternative, he could create a wrapper command that calls require("project==version") to find all the eggs and put them on sys.path.
Like modulefinder, modulegraph doesn't know anything about fancy PEP 302 stuff yet.
I meant, if he installed with --always-unzip to the system site- packages directory, such that EasyInstall put the needed paths in easy-install.pth.
So, I guess my suggestion to Kevin is to try installing to a directory on sys.path, using the new --always-unzip option to force the packages to be unzipped, and then try hacking py2app to do a require() before looking for dependencies (consulting the setuptools "test" command for an example).
I'm not sure you'd really want to hack py2app anyway, just the setup.py before setup() is called.
Er, no, because then he'd have to change the setup script between building the package and making an app out of it. It needs to be something that runs as a command, *not* something in the setup script.
Right, well, there's easy enough ways around that... subclass away :)
I suspect this means that the packages will get merged into one another with no distinction at runtime, but whatever works, works.
Yeah, I'm not sure why you would possibly care about this at runtime for an application that's "frozen", anyway.
If the application is composed of plugins, you'd want the plugins' metadata to be available, so there'd be additional work involved to get that put back together.
This is only really a concern for people doing egg-centric development (hah). I don't think this is going to be a problem just yet :)
Modulegraph should already know about all of the tricks in the stdlib (at least in 2.3, not sure if I updated it for 2.4) including the modules that are imported by the core behind your back (warnings, etc.).. It doesn't contain anything py2app specific, it might as well be used as-is.
http://svn.red-bean.com/bob/py2app/trunk/src/ (modulegraph depends on altgraph, the other stuff you can ignore)
Interesting. For py2exe this stuff makes some sense to me, but for py2app I wonder if you really even care about finding stdlib dependencies anyway, if your target Mac OS version has the stdlib already installed. It seems that in that case you could just use something like:
setup.py easy_install --always-unzip --always-copy --install- dir=appdir .
to dump all the unzipped eggs and scripts needed by the current project into 'appdir', and then do whatever Mac OS magic is needed to turn the directory into an application. Oh, and you'd also need to throw in a copy of pkg_resources, I suppose, since it's not part of Python... yet. :)
This approach isn't really an option for py2exe, since there's no version of Windows that bundles Python, but for the many Unix-y operating systems (including Mac OS) that provide Python as a standard feature, it's not a bad choice.
You really don't want to depend on the OS installed Python. The biggest reason is because Python 2.3 is going to disappear in 10.5, so your application breaks.