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


Re: [Pythonmac-SIG] managing python 2.4 and 2.5 on leopard

2008-08-10 Thread Christopher Barker

Warren Harris wrote:

I'm trying to understand the correct way to manage both a 2.4 and 2.5
installation on the same machine (mac 10.5.4). Actually, I have several
installed already, and I'd like to clean up this mess, but I'm afraid of
breaking things. 


You'll only break things if the things you uninstall are using them!

Anyway, here is my advise:

For 2.5: use either Apple's or the one from python .org. You can search 
this list for pluses and minuses, but I'd go with python.org's. A bit 
more about that later...


1) python that comes with leopard: 


This is Apple's -- don't mess with it -- Apple uses it for some utilities.


2) python installed by macports (can't remember why I seemed to need this,
or that the system python wasn't enough):


If you're not using macports for other stuff, I'd get rid of this one.


3) python 2.4 installed from dmg:
http://www.pythonmac.org/packages/py24-fat/dmg/python-2.4.4-macosx2006-10-18.dmg
-- I needed 2.4 for a project):


If you still need 2.4 for something then keep this one.


4) looks like I've got a 2.3 installed too
(/System/Library/Frameworks/Python.framework/Versions/2.3)


If you're not using it, you don't need it, but it won't hurt to have it 
there.



- Is there a better way to install 2.4 to live along side 2.5?


nope, you've got it fine.


- How to uninstall the 2.4 version cleanly?


1) you don't need to -- it won't hurt to have it there.
2) delete: /Library/Frameworks/Python.framework/Versions/2.4
   delete whatever says 2.4 under Applications/MacPython (I think -- I 
don't have a mac at home)



- Why does one live under /System/Library and the other under /Library (I
notice a bunch of things under /Library that appear to be duplicates, e.g.
perl, tcl, etc)?


/System is for stuff installed and maintained by Apple -- don't mess 
with anything there.


/Library is for stuff installed by third parties -- that's where you put 
an updated python, etc.



- Should I upgrade my system 2.5 version to 2.5.2 (and the correct method)?


No. Do not upgrade anything of Apple's. However, you might want 2.5.2, 
in which case, install the binary from python.org, it will go into 
/Library/Frameworks/...


Any number of python installations can live quite happily on one system. 
The question is, which do you get when you type:


$ python

That will be determined by your PATH environment variable. Type:

$ echo $PATH

to see what yours is. YOU can change it by editing your ~/.profile or 
~./bash_profile file (whichever you have).


Once you've got the one you want as default, you can get another one by 
typing:


$ python24

or

$ python25

(or putting that in your #! line)

Any extra packages you need will need to be installed in the version you 
want them for, maybe one for each version. If you install binaries, make 
sure they are for the version you want. If you install with setup.py, 
make sure to run setup.py with the version you want. If you use 
easy_install, it's a bit trickier. easy_install will use one of them by 
default. I'm not entirely sure how to get it to use another python -- 
I'd have to poke around a bit on my Mac. Maybe someone else here knows.


-Chris


--
Christopher Barker, Ph.D.
Oceanographer

NOAA/ORR/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig