So I did a little more work and removed all of the py2app / dependancies (macholib and modulegraph) and appscript from my site- packages folder and from the easy_install.pth file. Then I did an easy_install of macholib==dev, modulegraph==dev, and py2app==dev and then downloaded the source of appscrip and did python setup.py develop and somehow it worked.. I must have done things out of the wrong order or had something messed up with the easy_install.pth file or something.

Just to follow up and let people know.
Joe Losco

On Aug 30, 2008, at 1:33 PM, Joseph W. Losco wrote:

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",
           ),
       ),
   ),

)

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


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

Reply via email to