[Pythonmac-SIG] Py2App and third-party .egg dependencies installed through easy_install

Tobias Rodäbel tobias.rodaebel at mac.com
Tue Aug 28 09:56:58 CEST 2007


Hi Owen,

py2app (in particula modulegraph) cannot handle eggs in the right way.
unzip the ZSI egg into a directory with the same name, delete the egg  
and try the following setup.py

===================== snip =====================
#!/usr/bin/env python
from setuptools import setup

Plist = dict(CFBundleDocumentTypes= [],
              CFBundleIdentifier='net.lionsanctuary.foo.Client')

APP = ['startui.py']
DATA_FILES = []
OPTIONS = {
     'plist': Plist,
     'packages' : ['ZSI'],
}

setup(
     name='fooapp',
     version='0.0.1',
     app=APP,
     install_requires=['ZSI'],
     data_files=DATA_FILES,
     options={'py2app': OPTIONS},
     setup_requires=['py2app'],
)
===================== snip =====================

Cheers,
Tobias

Am 28.08.2007 um 04:56 schrieb Owen Jacobson:

> 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 at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig



More information about the Pythonmac-SIG mailing list