python – 使用py2app编译64位Mac应用程序
作者:互联网
我使用py2app 0.6.3在我的Mac OS X 10.7上编译了一个Python screen saver,但是当我在系统偏好设置中打开屏幕保护程序时,我收到以下消息:
You cannot use the Silly Balls screen saver on this computer.
我已经读过这条消息意味着它需要为64位编译.
我在64位系统上运行64位的Python 2.7.1.
如何使用py2app编译64位应用程序,使屏幕保护程序示例有效?
解决方法:
这样的事情 – 注意’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'],
)
标签:python,64bit,macos,screensaver,py2app 来源: https://codeday.me/bug/20190630/1336807.html