On 29 Apr, 2012, at 8:43, Jonathan Kossick wrote:

> Hello, I already worked with py2exe and just started to use py2app. 
> Actually I have some problems to include the zlib library. Under py2exe I 
> includet the library in the options but under Mac I get this error:
> 
> error: cannot copy tree 
> '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gzip.py': 
> not a directory
> 
> Do you have any Idea how to fix this? My setup.py file:
> 
> 
> from setuptools import setup
> APP = ['startr.py']
> DATA_FILES = []
> OPTIONS = {'argv_emulation': True, "packages": ["lxml","gzip"]}

Why do you use the packages option? Both py2app and py2exe should be smart 
enough to find dependencies automaticly when you use import statements that 
reference them.

The error from py2app is too cryptic, but is easy to explain: py2app assumes 
that anything you mention in the "packages" option is a package, and "gzip" is 
a module not a package. Changing the OPTIONS definition to the one below should 
work:

          OPTIONS = {'argv_emulation': True, "packages": ["lxml"], "include": 
["gzip"]}

Ronald

> 
> setup(
>     app=APP,
>     data_files=DATA_FILES,
>     options={'py2app': OPTIONS},
>     setup_requires=['py2app'],
>     
>     name='programm',
> )
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to