Re: [Pythonmac-SIG] how to recover from a framework build?
Bill Janssen jans...@parc.com wrote: Think I fixed things. I found two problems. First of all, my build wasn't universal, but it appparently overwrote the Python framework SDK in /Developer/. So when Xcode tried to build for both ppc and i386, it only found i386. That was the link error I originally posted. I'll re-install Xcode to see if I can fix that. By the way, this seems to me to be a bug. There are lots more people working on Python-Cocoa applications than people working on MacPython. I can see where this would be convenient for MacPython developers, but it shouldn't happen automagically. Secondly, when I then ran my Python-Cocoa app, it picked up the framework in /Library/Frameworks/Python..., which didn't have objc, so it bombed on that. I just deleted /Library/Frameworks/Python That seemed to fix that. Can anyone explain to me why this happened? Is this a side-effect of overwriting the /Developer version of the library? Bill ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
[Pythonmac-SIG] Problem in EasyDialogs???[Sec=Unclassified]
on Leopard 10.5.6 using python2.6.2 from macports When asking for multiple select in file dialog, get an error: raise Nav.error, arg TypeError: exceptions must be classes or instances, not str I can find the exception declared in this file: /opt/local/Library/Framewords/Python.Framework/Versions/2.6/lib/python2.6/lib-dynload/Nav.so So this is preventing me from finding out what my actual error is, but I notice that the same exception is used elsewhere. files = EasyDialogs.AskFileForOpen( message='Select files to recover:', multiple=True ) cheers, Mat ___ Australian Antarctic Division - Commonwealth of Australia IMPORTANT: This transmission is intended for the addressee only. If you are not the intended recipient, you are notified that use or dissemination of this communication is strictly prohibited by Commonwealth law. If you have received this transmission in error, please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and DELETE the message. Visit our web site at http://www.antarctica.gov.au/ ___ ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Problem in EasyDialogs???[Sec=Unclassified]
In article 1248999001.3965.0.ca...@mjoakes-desktop, mathew oakes mathew.oa...@aad.gov.au wrote: on Leopard 10.5.6 using python2.6.2 from macports When asking for multiple select in file dialog, get an error: raise Nav.error, arg TypeError: exceptions must be classes or instances, not str I can find the exception declared in this file: /opt/local/Library/Framewords/Python.Framework/Versions/2.6/lib/python2.6/lib- dynload/Nav.so So this is preventing me from finding out what my actual error is, but I notice that the same exception is used elsewhere. files = EasyDialogs.AskFileForOpen( message='Select files to recover:', multiple=True ) It appears that EasyDialogs is still using string exceptions which have been deprecated for some time and finally removed in Python 2.6. Unfortunately, EasyDialogs itself, along with a number of other obsolete Mac modules from the Classic Mac OS ( = 9) era, have been marked as deprecated in 2.6 and removed in Python 3 so there will be little incentive to fix it, though you're welcome to open an issue on the python bug tracker. If you can, it would be best to migrate away from use of EasyDialogs now. Short of that, you may have better luck with using it from Python 2.5. -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] how to recover from a framework build?
[reposting] On Jul 30, 2009, at 13:49 , Bill Janssen wrote: Bill Janssen jans...@parc.com wrote: Think I fixed things. I found two problems. First of all, my build wasn't universal, but it appparently overwrote the Python framework SDK in /Developer/. So when Xcode tried to build for both ppc and i386, it only found i386. That was the link error I originally posted. I'll re-install Xcode to see if I can fix that. By the way, this seems to me to be a bug. There are lots more people working on Python-Cocoa applications than people working on MacPython. I can see where this would be convenient for MacPython developers, but it shouldn't happen automagically. Sorry, I don't use Xcode for Python development but I'm having a hard time imagining what sequence of events would have caused the SDK to be overwritten. I'm assuming you mean: /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework Did you try to build Python within Xcode or something? Secondly, when I then ran my Python-Cocoa app, it picked up the framework in /Library/Frameworks/Python..., which didn't have objc, so it bombed on that. I just deleted /Library/Frameworks/Python That seemed to fix that. Can anyone explain to me why this happened? Is this a side-effect of overwriting the /Developer version of the library? The normal install path for a frameworks build is /Library/Frameworks/ Python.frameworks/Version/... . And it appears that /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks is a symlink to /Library/Frameworks. -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] how to recover from a framework build?
Ned Deily n...@acm.org wrote: Sorry, I don't use Xcode for Python development but I'm having a hard time imagining what sequence of events would have caused the SDK to be overwritten. I'm assuming you mean: /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework Did you try to build Python within Xcode or something? Nope. I unpacked the sources to /tmp, then did a make frameworkinstall, I believe it was. I expected things to wind up in /Library/Frameworks/Python.Framework, which they did. I was surprised to see that the library under /Developer had the same timestamps. Secondly, when I then ran my Python-Cocoa app, it picked up the framework in /Library/Frameworks/Python..., which didn't have objc, so it bombed on that. I just deleted /Library/Frameworks/Python That seemed to fix that. Can anyone explain to me why this happened? Is this a side-effect of overwriting the /Developer version of the library? The normal install path for a frameworks build is /Library/Frameworks/ Python.frameworks/Version/... . And it appears that /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks is a symlink to /Library/Frameworks. Hmmm. OK, that makes it clearer what happened. Here's the link line that Xcode uses (I presume this comes from the Python-Cocoa project template): Ld /p/goodstuff/build/cocoa-gadget.build/Release/goodStuff.build/Objects-normal/ppc/goodStuff normal ppc cd /p/goodstuff setenv MACOSX_DEPLOYMENT_TARGET 10.5 /Developer/usr/bin/gcc-4.0 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/p/goodstuff/build/Release -F/p/goodstuff/build/Release -filelist /p/goodstuff/build/cocoa-gadget.build/Release/goodStuff.build/Objects-normal/ppc/goodStuff.LinkFileList -mmacosx-version-min=10.5 -framework Cocoa -framework Python -framework WebKit -o /p/goodstuff/build/cocoa-gadget.build/Release/goodStuff.build/Objects-normal/ppc/goodStuff ld warning: in /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks//Python.framework/Python, file is not of required architecture Undefined symbols: _Py_SetProgramName, referenced from: _main in main.o _Py_Initialize, referenced from: _main in main.o _PySys_SetArgv, referenced from: _main in main.o _PyRun_SimpleFileExFlags, referenced from: _main in main.o ld: symbol(s) not found collect2: ld returned 1 exit status Apparently gcc resolved -framework Python to /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Python.framework, my new build. But why did it use that in preference to /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework, which also exists? Ah, the ld page says that The default framework search path is /Library/Frameworks then /System/Library/Frameworks. I probably want to add -Z -F/System/Library/Frameworks to the default template. Bill ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig