有关py2app

py2app is a Python setuptools command which will allow you to make standalone application bundles and plugins from Python scripts. py2app is similar in purpose and design to py2exe for Windows.

Latest Version 0.5.3

Installation

(py2app version 0.5 2010-07-28 Ronald Oussuroren)

"easy_install-X.Y -U py2app" should install the software, where X.Y is your favorite version of Python.

There is one new feature in this release: experimental support for python 3. This basicly means that I managed to build a single application as a standalone application bundle, without much testing. Alias builds and plugin bundles almost certainly don't work (the first because alias builds use the Carbon module which isn't available in python 3, the latter because I had to rewrite the C code in the application bundles and probably have to do the same for plugin bundles).

Notes

Execute a bundled app from the commandline to see error messages:

  • myapp.app/Contents/MacOS/myapp

Current repository:

Old subversion:

Original version:

Problems before 0.5

  • for 64-bit systems, the pypi package (0.4.2) failed.
    • even with macholib, altgraph and modulegraph gathered from all around.
  • here

    is some workaround http://hg.hardcoded.net/py2app,

    • that i have not tested, as macholib is missing

current state 0.5.2

questions

is it really necessary to run 'python setup.py py2app' with sudo ?

it writes into /Library ?

and there still is an error that ::

  • '/Library/Python/2.6/site-packages/py2app-0.5-py2.6.egg/py2app/apptemplate/prebuilt/main-i386'

is missing. There is only ::

  • main-fat3 main-intel main-universal

linking main-fat3 to main-i386 ::

  • 'cd /Library/Python/2.6/site-packages/py2app-0.5-py2.6.egg/py2app/apptemplate/prebuilt' 'ln -s main-fat3 main-i386'

makes the build succeed, when using sudo ::

  • sudo python setup-mac.py py2app

but the app crashes ::

  • mine.app/Contents/MacOS/mine Traceback (most recent call last):

    File "MySQLdb/init.pyc", line 19, in <module> File "_mysql.pyc", line 18, in <module> File "_mysql.pyc", line 15, in load ImportError: '/usr/lib/python2.6/lib-dynload/_mysql.so' not found

_so is in the app, but not in the system (i like to keep things local)

copying _mysql.so into /usr/lib/python2.6/lib-dynload, cured this.

Then it works.

Development

Python Versions

modulegraph/util.py requires python>=2.6 for immutable bytes by 'b"something"'.

Testing

py.test is used for testing. modulegraph/util.py contains tests in util.py. maybe revert to unittest.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值