开发者

python py2app help

开发者 https://www.devze.com 2023-03-25 05:51 出处:网络
I tried using py2app, but I can\'t figure out where to put the filename of the file I want to make the standalon开发者_运维技巧e for. What command do I need to run? I\'m extremely confused...In your s

I tried using py2app, but I can't figure out where to put the filename of the file I want to make the standalon开发者_运维技巧e for. What command do I need to run? I'm extremely confused...


In your setup.py, you want to do something like this:

from distutils.core import setup
import py2app

setup(name="App name",
      version="App version",
      options=opts, # see the py2app docs, could be a lot of things
      app=[main.py], # This is the standalone script
     )


See docs - you pass name of your file to py2applet script.

$ py2applet --make-setup MyApplication.py
Wrote setup.py
$ python setup.py py2app -A

And IMHO - pyInstaller - is the best tool for python binaries building.

0

精彩评论

暂无评论...
验证码 换一张
取 消