开发者

py2app and python 2.7 OSX 10.6

Does py2app work with python 2.7 on Snow Leopard?

I can't even get a 'hello world' to compile properly. Here's what I'm doing...

My script is

print "Hello World"

and then from a terminal:

cd myFolder
py2applet --make-setup helloWorld.py myIcon.icns
python setup.py py2app

The build hangs indefinitely at this point. If I add the -A switch it will build, but crashes 开发者_Python百科with a Tick Count error. If I edit the setup.py file and set argv_emulation to 'False' it'll build with the -A option and work (still hangs indefinitely without the -A). So my real question is:

How can I get this to build without the -A option?


It seems as though py2app had some issues with the 32/64-bit install of python 2.7 I was using (the official one from python.org). I downloaded a 32-bit only version of 2.7 and it works now.

On a related note, on another build I was using wxPython and to get it to work without the -A switch I had to import the package explicitly in my setup.py file.

DATA_FILES = []
OPTIONS = {'argv_emulation': True,
           'packages' : ['wx', 'pubsub'],

          }


I've read that you need to leave the 'argv_emulation': True setting out of the options for a 64bit build. Hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜