[Pythonmac-SIG] Can't convert simple Python script to bundle with py2app
skip at pobox.com
skip at pobox.com
Fri Nov 28 15:36:52 CET 2008
I have a trivial little script:
#!/usr/bin/env python
import os
import sys
os.execl("/Users/skip/local/bin/gnuclient", *sys.argv[1:])
which I want to convert to a .app bundle. I downloaded and installed py2app
using easy_install, successfully ran py2applet to generate a setup.py file:
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['rungnucl.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
then ran "python setup.py py2app" which gave me a traceback and dropped me
into pdb:
...
copying /Users/skip/local/lib/python2.7/lib-dynload/unicodedata.so -> /Users/skip/tmp/dist/rungnucl.app/Contents/Resources/lib/python2.7/lib-dynload
copying /Users/skip/local/lib/python2.7/lib-dynload/zlib.so -> /Users/skip/tmp/dist/rungnucl.app/Contents/Resources/lib/python2.7/lib-dynload
copying /Users/skip/local/bin/python -> /Users/skip/tmp/dist/rungnucl.app/Contents/MacOS
Traceback (most recent call last):
File "/Users/skip/local/lib/python2.7/site-packages/py2app-0.3.6-py2.7.egg/py2app/build_app.py", line 548, in _run
self.run_normal()
File "/Users/skip/local/lib/python2.7/site-packages/py2app-0.3.6-py2.7.egg/py2app/build_app.py", line 619, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File "/Users/skip/local/lib/python2.7/site-packages/py2app-0.3.6-py2.7.egg/py2app/build_app.py", line 723, in create_binaries
mm.mm.run_file(runtime)
File "build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py", line 65, in run_file
raise ValueError('%r does not exist' % (pathname,))
ValueError: '/Users/skip/local/lib/libpython2.7.dylib' does not exist
> /Users/skip/tmp/build/bdist.macosx-10.3-i386/egg/macholib/MachOGraph.py(65)run_file()
(Pdb)
Python (from Subversion trunk in this case) was configured using
--enable-shared, but there is no libpython2.7.dylib to be found anywhere
inside of the --prefix directory. It does generate a libpython2.7.a file.
I'm not doing a framework build. Do I need to?
Thanks,
--
Skip Montanaro - skip at pobox.com - http://smontanaro.dyndns.org/
More information about the Pythonmac-SIG
mailing list