1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| from setuptools import setup
|
| APP = ['密码查询工具.py'] # 替换为你的Python脚本名
| DATA_FILES = ['database_info.json'] # 如果你有其他的静态资源文件,添加到这里
| OPTIONS = {
| 'argv_emulation': True,
| 'packages': ['tkinter', 'mysql.connector'], # 你使用的额外Python包
| 'iconfile': 'mimatubiao.png', # 如果你有自定义图标,替换为图标文件路径
| 'plist': {
| 'CFBundleName': 'Password Query Tool',
| 'CFBundleShortVersionString': '0.1',
| 'CFBundleVersion': '0.1',
| 'CFBundleIdentifier': 'com.yourcompany.passwordquerytool'
| }
| }
|
| setup(
| app=APP,
| data_files=DATA_FILES,
| options={'py2app': OPTIONS},
| setup_requires=['py2app'],
| )
|
|