[Pythonmac-SIG] Py2App and third-party .egg dependencies installed through easy_install
Hi, I'm using an easy_install'ed copy of ZSI 2.0rc3, residing in ~/Library/Python/2.5/site-packages/ as ZSI-2.0_rc3-py2.5.egg. I have a py2app-enabled setup.py that reads as follows: #!/usr/bin/env python from setuptools import setup Plist = dict(CFBundleDocumentTypes= [], CFBundleIdentifier='net.lionsanctuary.foo.Client') APP = ['startui.py'] DATA_FILES = [] OPTIONS = {'plist': Plist, } setup( name='Name Goes Here', version='0.0.1', app=APP, # Added requires to see if it helped requires=['ZSI'], data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) --eof-- The script "startui.py" does indirectly reference ZSI classes: startui.pu: from foo import login foo/login/__init__.py: from soap.LoginService_services import LoginServiceLocator soap/LoginService_services.py: import ZSI (and others) All paths relative to the directory containing setup.py, obviously. The resulting .app bundle does not contain ZSI and as such will not run, even on my own system. How can I convince py2app to either include the .egg file or the relevant pieces of it? Owen ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Py2App and third-party .egg dependencies
On 8/28/07, Ronald Oussoren <[EMAIL PROTECTED]> wrote: > > On Tuesday, August 28, 2007, at 09:58AM, "Tobias Rodäbel" <[EMAIL PROTECTED]> > wrote: > >Hi Owen, > > > >py2app (in particula modulegraph) cannot handle eggs in the right way. > > ... yet. I have a patch for py2app & friends that deals with zipped packages > on sys.path (that is, zipped eggs), but haven't managed to merge that yet. > > That is a partial fix for issues like this, I'd like to teach py2app about > eggs, that is add an option to copy entire eggs into the application bundle > (possibly rewriting some bits of those eggs to avoid creating .python-eggs > turds in user home directories for extensions). > > >unzip the ZSI egg into a directory with the same name, delete the egg > >and try the following setup.py > > Or install using "easy_install -Z" instead of unzipping. Interesting. That works, even though ZSI depends in turn on other .egg distributions, which get correctly detected by modulegraph and correctly unpacked and copied by py2app. I wonder what it is about the ZSI .egg distribution that trips modulegraph up. Anyways, thank you very much to you both, py2app is much happier now. Good cheer, Owen ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig