Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
[python] py2exe와 py2app을 통한 Windows/OS X용 실행파일 만들기 본문
py2exe와 py2app 둘 다 distutils의 확장이기 때문에 다음과 같이 함께 사용할 수도 있습니다.
- setup.py
# -*- coding: utf-8 -*- from setuptools import setup import sys if sys.platform == "win32": # python setup.py py2exe import py2exe platform_options = { "windows": [{ "script": "run.py", "icon_resources": [(1, "window_icon.ico")], "dest_base": "dodo" }], "zipfile": None, "setup_requires": ["py2exe"], "options": { "py2exe": { "includes": ["PySide.QtCore", "PySide.QtGui", "PySide.QtWebKit", "PySide.QtNetwork", "PySide.QtXml"], "dll_excludes": ["w9xpopen.exe", "msvcr71.dll", "MSVCP90.dll"], "compressed": True } } } elif sys.platform == "darwin": # python setup.py py2app platform_options = { "setup_requires": ["py2app"], "app": ["run.py"], "options": { "py2app": { "argv_emulation": True, "includes": ["PySide.QtCore", "PySide.QtGui", "PySide.QtWebKit", "PySide.QtNetwork", "PySide.QtXml"], "iconfile": "window_icon.icns" } } } else: # python setup.py install platform_options = { "scripts": ["run.py"] } setup(name="test_py2xxx", description="py2xxx test application", version="0.0.1", **platform_options)
'서버 > MAC' 카테고리의 다른 글
자주 사용하는 Mac 단축키 (0) | 2018.01.03 |
---|---|
Mac에서 hosts 파일 변경 (0) | 2018.01.02 |
nmap으로 열려있는 포트 확인 (0) | 2018.01.01 |
Mac에 Python3.x 설치 (brew) (0) | 2018.01.01 |
Homebrew 설치 (0) | 2017.12.31 |
Comments