[Pythonmac-SIG] Py2App and Appscript / wxPython

Joseph W. Losco joelosco at frontiernet.net
Sat Aug 30 19:33:02 CEST 2008


Hey all,
I have an app that I've been trying to compile / bundle with py2app  
for a little while now.  I have been having some trouble and I did a  
little research online and learned that py2app can't bundle egg files,  
except I thought I saw somewhere that the SVN version can.. So I've  
tried with easy_install py2app==dev with its dependancy  
modulegraph==dev.  I also tried downloading the uncompiled source of  
appscript (which I'm not sure if i did properly, but i did a python  
setup.py develop so that it would not compile to an egg.

The error I'm getting is listed below as well as my setup.py    (with  
minor error differences that I can tell from the versions of py2app  
and appscript)

Any help would be greatly appreciated.

Joe Losco


Error after running python setup.py py2app

running py2app
Traceback (most recent call last):
   File "/Users/josephlosco/Library/Python/2.5/site-packages/ 
py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 579, in _run
     self.run_normal()
   File "/Users/josephlosco/Library/Python/2.5/site-packages/ 
py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 631, in run_normal
     mf = self.get_modulefinder()
   File "/Users/josephlosco/Library/Python/2.5/site-packages/ 
py2app-0.4.2-py2.5.egg/py2app/build_app.py", line 539, in  
get_modulefinder
     debug=debug,
   File "build/bdist.macosx-10.3-i386/egg/modulegraph/ 
find_modules.py", line 255, in find_modules
     find_needed_modules(mf, scripts, includes, packages)
   File "build/bdist.macosx-10.3-i386/egg/modulegraph/ 
find_modules.py", line 190, in find_needed_modules
     path = m.packagepath[0]
TypeError: 'NoneType' object is unsubscriptable
 > /Users/josephlosco/Code/hg/CalendarSyncGUI/build/bdist.macosx-10.3- 
i386/egg/modulegraph/find_modules.py(190)find_needed_modules()



My setup.py file is as follows.

#!/usr/bin/env python
"""
setup.py - script for building CalendarSync

Usage:
     % python setup.py py2app
"""
from distutils.core import setup
import py2app
from plistlib import Plist
import os

name = 'CalendarSync'
version = '1.0.0'

# Build the .app file
setup(
     app=[ name + '.py' ],
     options=dict(
         py2app=dict(
             iconfile='CalendarSync.icns',
             packages=['wx','appscript'],
             site_packages=True,
             resources=['resources/COPYING','CalendarSync.icns'],
             plist=dict(
                 CFBundleName               = "CalendarSync",
                 CFBundleShortVersionString = "1.0.0",     # must be  
in X.X.X format
                 CFBundleGetInfoString      = "CalendarSync 1.0.0",
                 CFBundleExecutable         = "CalendarSync",
             ),
         ),
     ),

)



More information about the Pythonmac-SIG mailing list