Re: [Pythonmac-SIG] Problem with Framework

2008-08-11 Thread has

Georg Seifert wrote:


is there a way to select witch framework to use?



You need to bind the framework yourself rather than using #import,  
e.g. see py2app's bundletemplate/src/main.m, or PyOSA's pythonloader.c  
file.


HTH

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

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


Re: [Pythonmac-SIG] Problem with Framework

2008-08-10 Thread Georg Seifert

is there a way to select witch framework to use?

Georg


On  9-Aug-2008, at 17:56 , Georg Seifert wrote:


Dyld Error Message:
 Library not loaded: /Library/Frameworks/Python.framework/Versions/ 
2.4/Python
 Referenced from: /Users/Tim/Desktop/Pantografer.app/Contents/MacOS/ 
Pantografer

 Reason: image not found


Here's the smoking gun: it tries to load a user-installed copy of  
Python 2.4 which doesn't exist.


I assume that on your development machine you have 2.4 installed,  
and /Library (with the user-installed 2.4) takes precedence over / 
System/Library (with the Apple-installed 2.5) when you built the app.



--
Jack Jansen, [EMAIL PROTECTED], http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma  
Goldman





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


Re: [Pythonmac-SIG] Problem with Framework

2008-08-10 Thread Jack Jansen


On 10-Aug-2008, at 12:06 , Georg Seifert wrote:


is there a way to select witch framework to use?


I've never found one. I have two tricks (working together) I use when  
I build software to distribute:
1. After building my distribution, I run a script   
testdependencies (attached to this message) that uses otool -L to  
ensure all dependencies are in Apple-maintained locations (i.e. no / 
Library, no /usr/local, etc).


testdependencies
Description: Binary data



2. If this script returns a warning (about one out of two times:-) I  
do a temporary sudo chmod 0 /usr/local /Library/Frameworks/ 
Python ... and rebuild the whole distribution. If there's anything  
that I really need from /Library or /usr/local I copy it into the  
bundle and mangle the name with install_name_tool. For Python-based  
projects py2app can do this for you, too.




Georg


On  9-Aug-2008, at 17:56 , Georg Seifert wrote:


Dyld Error Message:
 Library not loaded: /Library/Frameworks/Python.framework/Versions/ 
2.4/Python
 Referenced from: /Users/Tim/Desktop/Pantografer.app/Contents/ 
MacOS/Pantografer

 Reason: image not found


Here's the smoking gun: it tries to load a user-installed copy of  
Python 2.4 which doesn't exist.


I assume that on your development machine you have 2.4 installed,  
and /Library (with the user-installed 2.4) takes precedence over / 
System/Library (with the Apple-installed 2.5) when you built the app.



--
Jack Jansen, [EMAIL PROTECTED], http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma  
Goldman





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


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