[Pythonmac-SIG] Mac-Python Vs Apple Python history

Bob Ippolito bob at redivi.com
Fri Jan 16 19:07:13 EST 2004


On Jan 15, 2004, at 7:56 AM, Paul Sargent wrote:

> I'm trying to get my head around some bits and pieces to do with how 
> python has developed on the Mac platform. This is to help dealing with 
> old tutorials and other documents which describe how to do things on 
> an older installation and haven't been updated for 10.3 (which is what 
> I'm running)
>
> Now as I understand it (and from here on out, please correct me if 
> I've got it wrong, that way I can check see if my understanding is 
> correct) Apple didn't ship Python until 10.2. When they did this, they 
> missed out some bits (headers, or dynamic libraries or something?) 
> which meant that their installation was limited in what it could do 
> (extra modules couldn't be installed?) Therefore, on 10.2, despite 
> there being a python installation in 
> /System/Library/Frameworks/Python.framework/Versions/2.2, Mac-Python 
> for 10.2 consists of a full python installation which is installed 
> into /Library/Frameworks/Python.framework/Versions/2.3.

Python 2.2.0 was included with Mac OS X 10.2, it was not a framework 
build (standard --prefix=/usr build) and was not available as a dynamic 
library.  It did not include all of the Mac extensions to get at Carbon 
stuff.  Python 2.2.0 on the Mac had several bugs, especially one that 
meant that you can only use one "extension.so" per Python session, 
regardless of the path of "extension.so".  It shipped with a distutils 
configuration that prevented it from building extension modules 
properly by default, and probably some other things that I've 
forgotten.

> Net result was that two versions of python were installed on a 10.2 
> machine.

Not by default, of course, but any serious Python developer should have 
had two versions of Python on their machine.

> Correct so far? How was the system told which version of python should 
> be used?

"the system"?  I'm not sure what you mean.  The user would typically 
choose a default version of Python by changing their PATH.

> Now with 10.3, Apple included the missing bits(?). Therefore 
> Mac-Python was able to just add things on without problems. This makes 
> the Mac-Python for 10.3 install mainly consist of the package manager 
> and basic modules.

10.3 includes a framework build of Python 2.3.0 with all the modules 
that should have been included.  It is missing the GUI tools, so there 
is an add-ons package that installs these tools (Python IDE, 
PackageManager, etc.).

> Net result, on a 10.3 machine only one version of python is installed 
> and that's in /System/Library/Frameworks/...etc....

Typically.

> Therefore, as someone trying to learn on 10.3, whenever I see 
> documents talking about files in /Library/Frameworks I should 
> substitute /System/Library/Frameworks. Right?

It depends on what the documents are talking about.  If it says 
/Library/Frameworks/Tk.framework for example, which does not come with 
Mac OS X, then no substitution should be done.

> Of course, Mac-Python modules such as Numeric, or PyObjC are not 
> system components so paths to those on both systems are 
> /Library/Python.

well.. on a Mac OS X 10.3 version of Python 2.3, it is 
/Library/Python/2.3.  On a properly built MacPython 2.3 it is 
/Library/Python/2.3/site-packages.

> Is my understanding anywhere close to reality? Are we likely to need 
> to go back to the 10.2 scheme in the future when newer versions of 
> python appear?

It's not really clear what you mean by 10.2 scheme.. but if you want to 
run a version of Python newer than the one currently on your computer, 
then yeah, you'll have to install one separately and change your PATH.. 
among other things.

-bob




More information about the Pythonmac-SIG mailing list