Re: [Pythonmac-SIG] Can't convert simple Python script to bundle with py2app

2008-12-01 Thread Skip Montanaro
>  You're building a 2.7? what is that? I thought Python was going from 2.6 to
> 3.0.

Building from Subversion trunk identifies itself as 2.7a0.  There will
be a number of
other 2.x versions released more-or-less in parallel with 3.y versions.

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Can't convert simple Python script to bundle with py2app

2008-12-01 Thread Christopher Barker

[EMAIL PROTECTED] wrote:


Hmmm...  I just built a framework version.  I configured like so:

../configure --enable-framework='/Users/skip/Applications' \
 --enable-shared --prefix='/Users/skip/local' \
 CPPFLAGS='-I/Users/skip/local/include -I/opt/local/include' \
 LDFLAGS='-L/Users/skip/local/lib -L/opt/local/lib'

No .dylib file was created.



maybe that was a red hearing. I just did a quick look on my system:

$ locate libpython
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libpython.dylib
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libpython2.3.dylib
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libpython2.dylib
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/libpython2.5.a
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/config/libpython2.6.a
/usr/lib/libpython.dylib
/usr/lib/libpython2.3.dylib
/usr/lib/libpython2.dylib

so it looks like things have changed some between 2.3 and 2.5. This is 
an OS-X 10.4 system, so 2.3 is apple's build. 2.5 and 2.6 are the 
python.org Framework builds.


Is there a chance that your py2ap is getting confused about what python 
it is running in?



>raise ValueError('%r does not exist' % (pathname,))
>ValueError: '/Users/skip/local/lib/libpython2.7.dylib' does not
> exist

You're building a 2.7? what is that? I thought Python was going from 2.6 
to 3.0.



-Chris


--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Can't convert simple Python script to bundle with py2app

2008-11-30 Thread skip

>> 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?

Chris> very likely, yes. Py2app was designed around the Framework
Chris> build. In any case, it looks like you've got a static lib for the
Chris> main python lib, and py2app with require a dynamic one.

Hmmm...  I just built a framework version.  I configured like so:

../configure --enable-framework='/Users/skip/Applications' \
 --enable-shared --prefix='/Users/skip/local' \
 CPPFLAGS='-I/Users/skip/local/include -I/opt/local/include' \
 LDFLAGS='-L/Users/skip/local/lib -L/opt/local/lib'

No .dylib file was created.  I ran make altinstall then checked in both
/Users/skip/Applications/Python.framework and in ~/local.  Still no Python
.dylib files.  Then I scoured the Makefile looking for promising targets to
try.  I tried making both sharedmods and sharedinstall.  Nothing.

Thinking the --enable-framework and --prefix flags might mess up configure
in some way I reconfigured without specifying --prefix. make clean.  make
sharedinstall.  Still no dylib files.

Any other ideas I might try?

I finally just submitted a bug report:

http://bugs.python.org/issue4472

Thanks,

Skip
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] Can't convert simple Python script to bundle with py2app

2008-11-28 Thread skip

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 - [EMAIL PROTECTED] - http://smontanaro.dyndns.org/
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig