Re: [Pythonmac-SIG] Non-Qt basic question
As a followup to my ongoing attempt to distribute a hello world app, I re-installed MacPython and py2app and sent the result (now sitting in http://jones.tc/simple.tar.bz2) to a friend. He ran the app and got no result (no line printed in the console). The same occurs with a more complex app. Anyway, thanks for all the help everyone. If someone feels like building an app for a one-line script that just prints something, I can try comparing it with the app bundle I'm getting. Maybe that would reveal something. No need for anyone to spend more time on this though - from Bob's response, it sounds like it's a mess I've made for myself. Terry ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Non-Qt basic question
Chris Barker wrote: > Terry Jones wrote: > >>Ok, thanks for looking. I've been putting off moving to 10.4 because I will >>need to rebuild many things. Now it looks like I have a good reason. > > Well, perhaps, but as far as I can tell, there is still some open-source > software that doesn't work so well on 10.4 (gcc 4.0 issues). Maybe the > situation is good enough now, I'm not sure. You don't have to use gcc-4.0 on 10.4. gcc-3.3 is still there and perfectly functional. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Non-Qt basic question
| In any case, I would get rid of your python2.4 an install Bob's "Official | Unofficial" one. That may take care of your issue at the moment, and it's | easy to do. Thanks. I've already done it, and re-installed py2app. The py2app build now no longer contains the mysterious Contents/Frameworks/libbz2.1.dylib so I'm surely already in better shape. I'm just re-building a few more python things. I have readline now (ah.) which I didn't before; I'm pretty sure I built python from sources when I installed 2.4. Terry ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Non-Qt basic question
Terry Jones wrote: > Ok, thanks for looking. I've been putting off moving to 10.4 because I will > need to rebuild many things. Now it looks like I have a good reason. Well, perhaps, but as far as I can tell, there is still some open-source software that doesn't work so well on 10.4 (gcc 4.0 issues). Maybe the situation is good enough now, I'm not sure. In any case, I would get rid of your python2.4 an install Bob's "Official Unofficial" one. That may take care of your issue at the moment, and it's easy to do. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (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] Non-Qt basic question
| There's something wrong with the way it's linked together. The | Python framework doesn't have its headers rewritten, and I'm not sure | what the heck libbz2 is doing in there. This isn't the official 2.4 | distro, is it? I've never seen it do this before. No, it's not. When I started playing with python and I noticed there was a python 2.4 out and that I only had 2.3, I upgraded. I guess some combination of what I have is somehow broken. | Unfortunately, I don't really care about 10.3 anymore, so there isn't | much more I can do for you... Ok, thanks for looking. I've been putting off moving to 10.4 because I will need to rebuild many things. Now it looks like I have a good reason. Terry ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Non-Qt basic question
On Oct 14, 2005, at 12:26 PM, Terry Jones wrote: > Hi again. > > While attempting to solve my Qt problem, I made a dead-simple Hello > World > python script (two lines, #!... and print) and turned it into an > app with > py2app. > > When I run it (open on the command line, double click in the > finder, single > click on the icon in the dock), I get 'Hello World' printed to the > console. > > That's what I expected. > > However, when I send the app to a friend and he runs it (also on > 10.3.x if > that makes any difference), nothing appears on the console, or > anywhere > else, no matter how he tries to run it . That's not at all what I > expected. > > The setup.py is of course trivial, the contents of the dist and build > directories look as I would expect, py2app runs with no error, and as > mentioned the app runs fine on my machine. > > I feel like I must be doing something wrong, but this is roughly the > simplest possible app and I'm following the instructions in the py2app > docs. > > I've put the resulting app into http://jones.tc/simple.app.bz2 in case > anyone wants a look. There's something wrong with the way it's linked together. The Python framework doesn't have its headers rewritten, and I'm not sure what the heck libbz2 is doing in there. This isn't the official 2.4 distro, is it? I've never seen it do this before. Unfortunately, I don't really care about 10.3 anymore, so there isn't much more I can do for you... -bob ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Still hitting ImportError when trying to open app made with py2app
Hi Dethe | The lack of a response is probably due to the general unfamiliarity with QT | on this list. Mostly Cocoa gets advocated for Mac use, although some folks | are using wx, Tkinter, or PyGame. Beyond that things start to get into | less travelled territory pretty quick, although there are certainly many | more options. So I suspect silence is simply a whole bunch of people | refraining from posting "I dunno" to the list. Thanks. Maybe I'll learn something along the way and be able to contribute. Terry ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Non-Qt basic question
Hi again. While attempting to solve my Qt problem, I made a dead-simple Hello World python script (two lines, #!... and print) and turned it into an app with py2app. When I run it (open on the command line, double click in the finder, single click on the icon in the dock), I get 'Hello World' printed to the console. That's what I expected. However, when I send the app to a friend and he runs it (also on 10.3.x if that makes any difference), nothing appears on the console, or anywhere else, no matter how he tries to run it . That's not at all what I expected. The setup.py is of course trivial, the contents of the dist and build directories look as I would expect, py2app runs with no error, and as mentioned the app runs fine on my machine. I feel like I must be doing something wrong, but this is roughly the simplest possible app and I'm following the instructions in the py2app docs. I've put the resulting app into http://jones.tc/simple.app.bz2 in case anyone wants a look. Terry ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Still hitting ImportError when trying to open app made with py2app
| > I went back to the INSTALL file for Mac Qt, and noticed that they | > recommend | > | > ln -sf $QTDIR/lib/libqt.3.dylib /usr/lib | > ln -sf $QTDIR/lib/libqui.1.dylib /usr/lib | | That's bad! Don't do that, remove those links. /usr/local/lib would | be a lot better. That will not build a redistributable application, | py2app correctly assumes everything in system locations is a system | component, so will not be included in any app created with the tool. I'll take your word for it (and I have moved the links to /usr/local/lib), but those libs did seem to get picked up by py2app when in /usr/lib. I didn't look closely at the output, but I saw that they got copied and stripped. | > Is this a known problem? | | Qt is a known problem :) Argh... I guess I'll try to live with it. There seems to be a nice cross-platform combination of Python, Qt, PyOpenGL and Pivy (coin / open inventor) that I've been hoping will all play together nicely. I don't see an alternative, without backing off to C++, which I don't much fancy (C++ being another known problem :-)) Thanks again, Terry ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Still hitting ImportError when trying to open app made with py2app
Hi Terry, The lack of a response is probably due to the general unfamiliarity with QT on this list. Mostly Cocoa gets advocated for Mac use, although some folks are using wx, Tkinter, or PyGame. Beyond that things start to get into less travelled territory pretty quick, although there are certainly many more options. So I suspect silence is simply a whole bunch of people refraining from posting "I dunno" to the list. Best wishes. --Dethe ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Still hitting ImportError when trying to open app made with py2app
On Oct 14, 2005, at 11:03 AM, Terry Jones wrote: > Thanks a lot for your answer and pointer. > > | Last I checked, Qt wasn't ported correctly to OS X; it requires some > | extra crap to be set. As part of the Qt directions you're required > | to set DYLD_LIBRARY_PATH so that the linker and applications can > find > | the Qt libraries. Make sure that DYLD_LIBRARY_PATH (or whatever > they > | recommend) set before you run py2app, or else it won't find those > | dylibs. > > I already had DYLD_LIBRARY_PATH and QTDIR in my environment when > running > py2app. But thinking about your comment, it occurred to me that > maybe these > weren't set in the environment the app was seeing when invoked by the > finder. So I added them both to my ~/.MacOS/environment.plist. > > This didn't help. But I did notice that when double-clicking on the > application (after moving it to /Applications) in the finder caused > the > finder window to crash. > > I went back to the INSTALL file for Mac Qt, and noticed that they > recommend > > ln -sf $QTDIR/lib/libqt.3.dylib /usr/lib > ln -sf $QTDIR/lib/libqui.1.dylib /usr/lib That's bad! Don't do that, remove those links. /usr/local/lib would be a lot better. That will not build a redistributable application, py2app correctly assumes everything in system locations is a system component, so will not be included in any app created with the tool. > So I did this and rebuilt via py2app. This does seem to work - the > libs get > picked up and I can fire up the app in 3 ways (open via bash, > double click > in finder, single click on icon in dock). > > One oddity that remains is that if I open a new finder window and > click > once on Applications, and then once on the name of my app, the finder > window crashes and the following appears in the Console: > > | 2005-10-14 19:52:59.181 Finder[1315] *** _NSAutoreleaseNoPool(): > Object 0x6f6e30 of class NSCFString autoreleased with no pool in > place - just leaking > | 2005-10-14 19:52:59.182 Finder[1315] *** -[NSCFNumber length]: > selector not recognized > | 2005-10-14 19:52:59.182 Finder[1315] *** _NSAutoreleaseNoPool(): > Object 0x5644db0 of class NSCFString autoreleased with no pool in > place - just leaking > | 2005-10-14 19:52:59.182 Finder[1315] *** _NSAutoreleaseNoPool(): > Object 0x5645d80 of class NSCFString autoreleased with no pool in > place - just leaking > | 2005-10-14 19:52:59.182 Finder[1315] *** _NSAutoreleaseNoPool(): > Object 0x5644e00 of class NSException autoreleased with no pool in > place - just leaking > | 2005-10-14 19:52:59.182 Finder[1315] *** Uncaught exception: > *** -[NSCFNumber length]: selector not > recognized > > Is this a known problem? Qt is a known problem :) -bob ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Still hitting ImportError when trying to open app made with py2app
Hi Bob Thanks a lot for your answer and pointer. | Last I checked, Qt wasn't ported correctly to OS X; it requires some | extra crap to be set. As part of the Qt directions you're required | to set DYLD_LIBRARY_PATH so that the linker and applications can find | the Qt libraries. Make sure that DYLD_LIBRARY_PATH (or whatever they | recommend) set before you run py2app, or else it won't find those | dylibs. I already had DYLD_LIBRARY_PATH and QTDIR in my environment when running py2app. But thinking about your comment, it occurred to me that maybe these weren't set in the environment the app was seeing when invoked by the finder. So I added them both to my ~/.MacOS/environment.plist. This didn't help. But I did notice that when double-clicking on the application (after moving it to /Applications) in the finder caused the finder window to crash. I went back to the INSTALL file for Mac Qt, and noticed that they recommend ln -sf $QTDIR/lib/libqt.3.dylib /usr/lib ln -sf $QTDIR/lib/libqui.1.dylib /usr/lib So I did this and rebuilt via py2app. This does seem to work - the libs get picked up and I can fire up the app in 3 ways (open via bash, double click in finder, single click on icon in dock). One oddity that remains is that if I open a new finder window and click once on Applications, and then once on the name of my app, the finder window crashes and the following appears in the Console: | 2005-10-14 19:52:59.181 Finder[1315] *** _NSAutoreleaseNoPool(): Object 0x6f6e30 of class NSCFString autoreleased with no pool in place - just leaking | 2005-10-14 19:52:59.182 Finder[1315] *** -[NSCFNumber length]: selector not recognized | 2005-10-14 19:52:59.182 Finder[1315] *** _NSAutoreleaseNoPool(): Object 0x5644db0 of class NSCFString autoreleased with no pool in place - just leaking | 2005-10-14 19:52:59.182 Finder[1315] *** _NSAutoreleaseNoPool(): Object 0x5645d80 of class NSCFString autoreleased with no pool in place - just leaking | 2005-10-14 19:52:59.182 Finder[1315] *** _NSAutoreleaseNoPool(): Object 0x5644e00 of class NSException autoreleased with no pool in place - just leaking | 2005-10-14 19:52:59.182 Finder[1315] *** Uncaught exception: *** -[NSCFNumber length]: selector not recognized Is this a known problem? Anyway, it does seem that you've solved my problem, thank you. I should have gone back to the Qt installation instructions on my own. Now to see if someone else can open my app. I have another question coming up :-) Regards, Terry. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Still hitting ImportError when trying to open app made with py2app
On Oct 14, 2005, at 4:03 AM, Terry Jones wrote: > I sent mail about a py2app problem I ran into on Sept 28. While I know > no-one has a right to expect answers or help, I was a little > surprised that > there were no suggestions or pointers at all about what might be going > wrong. Perhaps this indicates that I (or my python config at least) > have > some kind of odd problem? > > My original post is at > http://aspn.activestate.com/ASPN/Mail/Message/pythonmac-sig/2835476 > in case anyone feels like having a look. Last I checked, Qt wasn't ported correctly to OS X; it requires some extra crap to be set. As part of the Qt directions you're required to set DYLD_LIBRARY_PATH so that the linker and applications can find the Qt libraries. Make sure that DYLD_LIBRARY_PATH (or whatever they recommend) set before you run py2app, or else it won't find those dylibs. -bob ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Still hitting ImportError when trying to open app made with py2app
I sent mail about a py2app problem I ran into on Sept 28. While I know no-one has a right to expect answers or help, I was a little surprised that there were no suggestions or pointers at all about what might be going wrong. Perhaps this indicates that I (or my python config at least) have some kind of odd problem? My original post is at http://aspn.activestate.com/ASPN/Mail/Message/pythonmac-sig/2835476 in case anyone feels like having a look. Apologies for what amounts to a re-post (and, btw, it's definitely not a complaint.) Regards, Terry. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] problems using py2app
Bob Ippolito wrote: > > On Oct 14, 2005, at 2:23 AM, Richard Taylor wrote: > >> Bob Ippolito wrote: >> >> >>> >>> On Oct 12, 2005, at 6:07 AM, Richard Taylor wrote: >>> >>> I am trying to use py2app (http://undefined.org/python/) to package a gnome-python application called gramps (http://www.gramps- project.org) for MAC OS X. py2app does not have a mailing list so I started by posting to comp.lang.python and someone there pointed me here instead. If anyone could point me in the direction of a better forum is there is one. The command I am running is: python setup.py py2app The error I am getting is (the full output is attached): -> raise ValueError, "New Mach-O header is too large to relocate" It looks like there is a problem with the number of libraries that gramps depends on, but I am new to the MAC and py2app so I am not sure where to turn next to overcome this problem. Any ideas? >>> >>> >>> It's only loosely related to the number of libraries. It's >>> somewhat difficult to explain exactly why this error occurs, but >>> it is normally quite rare and there isn't much that can be done >>> about it from the py2app side of things. >>> >>> The solution is to re-link the libraries that are having this >>> problem with the -headerpad_max_install_names ld flag. I think >>> that there's some way to set LDFLAGS appropriately and then use >>> port to rebuild them, but you'll have to ask someone else who >>> knows more about the DarwinPorts toolchain because I have no idea. >>> >>> >> Is there any way of isolating which libraries are causing the >> problem? Rebuilding all of the libraries would be a bit of pain. > > > Inspect the stack when it throws the error to see which one caused > the problem, repeat until you get them all. > Many thanks, I will give it a try. Richard ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] problems using py2app
On Oct 14, 2005, at 2:23 AM, Richard Taylor wrote: > Bob Ippolito wrote: > > >> >> On Oct 12, 2005, at 6:07 AM, Richard Taylor wrote: >> >> >>> I am trying to use py2app (http://undefined.org/python/) to >>> package a >>> gnome-python application called gramps (http://www.gramps- >>> project.org) for >>> MAC OS X. >>> >>> py2app does not have a mailing list so I started by posting to >>> comp.lang.python and someone there pointed me here instead. If >>> anyone could >>> point me in the direction of a better forum is there is one. >>> >>> The command I am running is: >>> >>> python setup.py py2app >>> >>> The error I am getting is (the full output is attached): >>> >>> -> raise ValueError, "New Mach-O header is too large to relocate" >>> >>> It looks like there is a problem with the number of libraries that >>> gramps depends on, but I am new to the MAC and py2app so I am >>> not sure where >>> to turn next to overcome this problem. >>> Any ideas? >>> >> >> >> It's only loosely related to the number of libraries. It's >> somewhat difficult to explain exactly why this error occurs, but >> it is normally quite rare and there isn't much that can be done >> about it from the py2app side of things. >> >> The solution is to re-link the libraries that are having this >> problem with the -headerpad_max_install_names ld flag. I think >> that there's some way to set LDFLAGS appropriately and then use >> port to rebuild them, but you'll have to ask someone else who >> knows more about the DarwinPorts toolchain because I have no idea. >> >> > Is there any way of isolating which libraries are causing the > problem? Rebuilding all of the libraries would be a bit of pain. Inspect the stack when it throws the error to see which one caused the problem, repeat until you get them all. -bob ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] problems using py2app
Bob Ippolito wrote: > > On Oct 12, 2005, at 6:07 AM, Richard Taylor wrote: > >> I am trying to use py2app (http://undefined.org/python/) to package a >> gnome-python application called gramps (http://www.gramps- >> project.org) for >> MAC OS X. >> >> py2app does not have a mailing list so I started by posting to >> comp.lang.python and someone there pointed me here instead. If >> anyone could >> point me in the direction of a better forum is there is one. >> >> The command I am running is: >> >> python setup.py py2app >> >> The error I am getting is (the full output is attached): >> >> -> raise ValueError, "New Mach-O header is too large to relocate" >> >> It looks like there is a problem with the number of libraries that >> gramps depends on, but I am new to the MAC and py2app so I am not >> sure where >> to turn next to overcome this problem. >> Any ideas? > > > It's only loosely related to the number of libraries. It's somewhat > difficult to explain exactly why this error occurs, but it is > normally quite rare and there isn't much that can be done about it > from the py2app side of things. > > The solution is to re-link the libraries that are having this problem > with the -headerpad_max_install_names ld flag. I think that there's > some way to set LDFLAGS appropriately and then use port to rebuild > them, but you'll have to ask someone else who knows more about the > DarwinPorts toolchain because I have no idea. > Is there any way of isolating which libraries are causing the problem? Rebuilding all of the libraries would be a bit of pain. Richard ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] problems using py2app
On Oct 12, 2005, at 6:07 AM, Richard Taylor wrote: > I am trying to use py2app (http://undefined.org/python/) to package a > gnome-python application called gramps (http://www.gramps- > project.org) for > MAC OS X. > > py2app does not have a mailing list so I started by posting to > comp.lang.python and someone there pointed me here instead. If > anyone could > point me in the direction of a better forum is there is one. > > The command I am running is: > > python setup.py py2app > > The error I am getting is (the full output is attached): > > -> raise ValueError, "New Mach-O header is too large to relocate" > > It looks like there is a problem with the number of libraries that > gramps depends on, but I am new to the MAC and py2app so I am not > sure where > to turn next to overcome this problem. > Any ideas? It's only loosely related to the number of libraries. It's somewhat difficult to explain exactly why this error occurs, but it is normally quite rare and there isn't much that can be done about it from the py2app side of things. The solution is to re-link the libraries that are having this problem with the -headerpad_max_install_names ld flag. I think that there's some way to set LDFLAGS appropriately and then use port to rebuild them, but you'll have to ask someone else who knows more about the DarwinPorts toolchain because I have no idea. -bob ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig