Issues

Issue #112 new

pyqt4

opensw
created an issue

I have some troubles with py2app with all scripts that I developed with pyqt4 (maybe the problem is not related to pyqt4, but if I test py2app with simple application like 'Hello world' script all works just fine). I am using last MacPorts version (MacPorts-2.1.3-10.8-MountainLion) with python 2.7.4 and py2app 0.7.3. After two days of testing I cannot figure out what is wrong, is it a bug?

setup.py file for py2app:

from setuptools import setup

APP = ['main.py']
OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4._qt', 'PyQt4.QtCore', 'PyQt4.QtGui'],
    'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtSql', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.phonon']}

setup(
      app=APP,
      options={'py2app': OPTIONS},
      setup_requires=['py2app'],
)

And this is the log:

python setup.py py2app
running py2app
creating /Users/opensw/SkyDrive/SISSA/Kymograph/build/bdist.macosx-10.6-intel/python2.7-standalone/app
creating /Users/opensw/SkyDrive/SISSA/Kymograph/build/bdist.macosx-10.6-intel/python2.7-standalone/app/collect
creating /Users/opensw/SkyDrive/SISSA/Kymograph/build/bdist.macosx-10.6-intel/python2.7-standalone/app/temp
creating build/bdist.macosx-10.6-intel/python2.7-standalone/app/lib-dynload
creating build/bdist.macosx-10.6-intel/python2.7-standalone/app/Frameworks
*** using recipe: virtualenv ***
WARNING: ImportError in sip recipe ignored: No module named matplotlib-1
WARNING: ImportError in sip recipe ignored: No module named scipy-0
*** using recipe: sip ***
*** using recipe: matplotlib ***
*** using recipe: scipy ***
Traceback (most recent call last):
  File "setup.py", line 10, in <module>
    setup_requires=['py2app'],
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/opensw/SkyDrive/SISSA/Kymograph/py2app-0.7.3-py2.7.egg/py2app/build_app.py", line 553, in run
    self._run()
  File "/Users/opensw/SkyDrive/SISSA/Kymograph/py2app-0.7.3-py2.7.egg/py2app/build_app.py", line 741, in _run
    self.run_normal()
  File "/Users/opensw/SkyDrive/SISSA/Kymograph/py2app-0.7.3-py2.7.egg/py2app/build_app.py", line 816, in run_normal
    self.process_recipes(mf, filters, flatpackages, loader_files)
  File "/Users/opensw/SkyDrive/SISSA/Kymograph/py2app-0.7.3-py2.7.egg/py2app/build_app.py", line 710, in process_recipes
    find_needed_modules(mf, packages=rval['packages'])
  File "build/bdist.macosx-10.6-intel/egg/modulegraph/find_modules.py", line 199, in find_needed_modules
TypeError: 'NoneType' object has no attribute '__getitem__'

Comments (2)

  1. opensw reporter

    Hi :) I tried the py2app distribution examples about pyqt and this is the log:

    opensw:hello_app opensw$ python setup.py py2app
    Traceback (most recent call last):
      File "setup.py", line 8, in <module>
        import py2app
    ImportError: No module named py2app
    

    Something was wrong with my installation (from MacPorts). If I uninstall py2app from MacPorts and compile the source code by myself everything is working like expected for the pyqt distribution examples, but it is not working with my pyqt application (same error like above with and without includes/excludes options).

  2. Log in to comment