[Pythonmac-SIG] Building a MacPython-OSX on top of Jaguar's /usr/bin/python

Jack Jansen Jack.Jansen@oratrix.com
Fri, 22 Nov 2002 00:41:22 +0100


Folks,
I've made quite some progress on building a MacPython-OSX that sits on 
top of the Apple-installed /usr/bin/python in Jaguar.

You're all kindly requested to give this a try, it will not interfere 
with a framework build of Python, and it is very easy to remove. Get 
the cvs version of python 2.3a0, and see Mac/OSX/README.JAGUAR for the 
build instructions.

There's one serious problem that I need a workaround for, though: the 
"macfs" module that shipped with Python 2.2 uses Mac pathnames in stead 
of unix pathnames. This causes all sorts of problems with the IDE, and 
probably with lots of other software as well.

The "glue" that ties the new stuff in the existing distribution is 
currently a MacPython.pth file in /usr/lib/python2.2/Lib/site-python, 
but officially this only allows appending to sys.path, not prepending, 
and the latter would be needed to override macfs with a newer version. 
There is a hack around this (add a line "import sys; sys.path.insert(0, 
....)" to the .pth file), but I would like to hear of any other ideas 
to fix this.

There is also the (probably purely theoretical) possibility that some 
users of Jaguar Python depend on using colon-style pathnames for 
FSSpecs, so then installing MacPython-OSX would break things for them.

An alternative is to do away with FSSpecs completely, and switch to 
FSRefs everywhere, but this would require first implementing enough 
support for FSRefs, and then fixing all the Python code (especially 
FSSpecs pointing to non-existing files will be a problem).

I'm open to good ideas,
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -