简单的 hello world QT python 脚本。从命令行工作正常。当我打包它时,我得到:
Traceback (most recent call last):
File "/Users/jquick/bin/dist/gui.app/Contents/Resources/__boot__.py", line 340, in <module>
_run('/Users/jquick/bin/gui.py')
File "/Users/jquick/bin/dist/gui.app/Contents/Resources/__boot__.py", line 336, in _run
execfile(scriptpath, globals(), globals())
File "/Users/jquick/bin/gui.py", line 3, in <module>
from PySide.QtCore import *
ImportError: No module named PySide.QtCore
2012-06-02 00:23:04.823 gui[4835:707] gui Error
所以听起来它不包括模块..但我尝试将它包括在 setup.py 和命令行中。没有任何作用:(
设置.py:
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['gui.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True, 'includes': ['PySide.QtCore', 'PySide.QtGui']}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
我尝试使用 --alias 选项和不使用创建。甚至尝试将它们标记为包裹。但我所做的一切似乎都没有包括它们。