Created
March 1, 2019 14:12
-
-
Save alptugan/8a8ddc8b892012b5b1a91e4bc20e590d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1- Generate Setup py | |
py2applet --make-setup your_app_name.py | |
# 2- To relase it as an app | |
python setup.py py2app -A | |
# 3- To relase it as an dist app | |
python setup.py py2app | |
# Alternative way with more options | |
# | |
# 1- Use the following setup.py to generate app | |
from setuptools import setup | |
APP = ['app_tk_Class.py'] | |
APP_NAME = "MacOS Utility" | |
DATA_FILES = [] | |
OPTIONS = { | |
'argv_emulation': True, | |
'iconfile': 'mutility.icns', | |
'plist': { | |
'CFBundleName': APP_NAME, | |
'CFBundleDisplayName': APP_NAME, | |
'CFBundleGetInfoString': "Set of Utilities to change operating system features", | |
'CFBundleIdentifier': "com.alptugan.macosutility", | |
'CFBundleVersion': "0.1.0", | |
'CFBundleShortVersionString': "0.1.0", | |
'NSHumanReadableCopyright': "Copyright © 2019, Alp Tuğan, All Rights Reserved" | |
} | |
} | |
setup( | |
name=APP_NAME, | |
app=APP, | |
data_files=DATA_FILES, | |
options={'py2app': OPTIONS}, | |
setup_requires=['py2app'], | |
) | |
# 2- To relase it as an dev app | |
python setup.py py2app -A | |
# 3- To relase it as an dist app | |
python setup.py py2app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment