[Pythonmac-SIG] Hello World Cross Platform Problems

2008-10-03 Thread Ken Mankoff

Hi PythonMac List,

I'm new to python and wxPython/wxWidgets and this whole development 
environment, and I'm having some trouble I hope you all can help 
with.


I'm trying to get a Hello World application in wxWidgets as a 
stand-alone app running on multiple machines via py2app. The second 
machine is OS X 10.4 PPC with the system python of 2.3. Python 2.5.2 
is installed via fink but I don't think that the double-clickable 
app access that version.


My dev machine is OS X 10.5 Intel. I've built python 2.6 as a 
framework. I used " --enable-universalsdk" and 
"--enable-framework=/opt/python/2.6/Framework" to configure.


I built wxWidgets with "--enable-universal_binary" and 
"--with-macosx-version-min=10.4". I built wxPython with "python2.6 
setup.py build_ext BUILD_GLCANVAS=0 --inplace --debug"


When I run py2applet I get a .app that runs on the local machine but 
not on the 10.4/PPC/Python2.3 machine. I've tried skipping py2applet 
and running "python setup.py py2app" and I get the same results.


It appears the .app continues to look for python versions that exist 
only on the dev machine. I see people have posted about this in the 
past on this list and the advice is "don't use Apple python, build 
your own from python.org" and I have done that, but still have this 
issue.



hello.app mankoff$ ./Contents/MacOS/python
dyld: Library not loaded: 
/System/Library/Frameworks/Python.framework/Versions/2.5/Python
  Referenced from: 
/Users/mankoff/Desktop/hello.app/./Contents/MacOS/python

  Reason: image not found
Trace/BPT trap

$


Any advice will be much appreciated.

Thanks,

  -k.

P.S. The wxPython docs state that Fink users will require X11. Build 
your own if you want Aqua widgets. After having issues (above) with 
roll-your-own I decided to try fink (fink install py2app-py24), to 
see if it would work even in X11. It did not work on the 10.4 
machine either, but it did work on the development machine in *Aqua* 
not X11.

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


Re: [Pythonmac-SIG] Hello World Cross Platform Problems

2008-10-03 Thread Christopher Barker

Ken Mankoff wrote:
I'm trying to get a Hello World application in wxWidgets as a 
stand-alone app running on multiple machines via py2app.


Just so you know -- you are staying into a lot of new territory here. I 
don't think either of py2app or wxPython have been tested with Python2.6


Do you really need 2.6? This is going to be a whole lot easier if you 
just stuck with python,.org's 2.5.2 build.


That being said, thanks for being a pioneer!

> The second
machine is OS X 10.4 PPC with the system python of 2.3. Python 2.5.2 is 
installed via fink but I don't think that the double-clickable app 
access that version.


neither of these should matter, that is the idea of py2app.

I built wxWidgets with "--enable-universal_binary" and 
"--with-macosx-version-min=10.4". I built wxPython with "python2.6 
setup.py build_ext BUILD_GLCANVAS=0 --inplace --debug"


I"m not sure you want the --inplace here, but I"m no expert, and I don't 
think that's you problem anyway!


I've tried skipping py2applet and 
running "python setup.py py2app" and I get the same results.


if that's not a typo, then that may be your problem. make sure you are 
running py2app with python2.6:


python2.6 setup.py py2app


hello.app mankoff$ ./Contents/MacOS/python
dyld: Library not loaded: 
/System/Library/Frameworks/Python.framework/Versions/2.5/Python


That's Apple's system python that comes with 10.5 I suspect that you ran 
py2app with that python, in which case this is exactly what you'd expect.


By the way, just to keep things clean, I'd try to py2app a little app 
that doesn't use wx first.


P.S. The wxPython docs state that Fink users will require X11. Build 
your own if you want Aqua widgets. After having issues (above) with 
roll-your-own I decided to try fink (fink install py2app-py24),


I'd stay away from fink anyway -- does it support Universal builds at 
all? Also, on eof the key points of wx is that if produces native GUIs 
-- why'd you want to give your Mac users an X11 GUI with it?


-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