我使用py2app 0.6.3在我的Mac OS X 10.7上编译了Python screen saver,但是当我在系统偏好设置中打开屏幕保护程序时,我收到以下消息:
您无法在此计算机上使用Silly Balls屏幕保护程序。
我已经读过这条消息意味着它需要为64位编译。
我在64位系统上运行64位的Python 2.7.1。
答案 0 :(得分:3)
这样的事情 - 注意'LSArchitecturePriority':'x86_64',
#cat ./setup.py
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup, find_packages
APP = ['YourApp.py']
DATA_FILES = []
OPTIONS = {
'argv_emulation': False,
'semi_standalone':'False',
'optimize': 2,
'includes': [
...
],
'site_packages': 'True',
'plist' : {
'LSPrefersPPC' : False,
'LSArchitecturePriority' : 'x86_64',
}
}
setup(
name = "YourApp",
version = "0.0.4",
author = "Iam",
author_email = "info@test.com",
description = ("An demonstration of how to create, document, and publish MacOS app"),
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)