[Pythonmac-SIG] Main Python on Mac version?

Bob Ippolito bob at redivi.com
Fri Feb 11 18:20:35 CET 2005


On Feb 11, 2005, at 11:59 AM, Roger Binns wrote:

>> The standard library is large, it's entirely possible that five 
>> bugfix releases go by and don't touch anything you use.
>
> I think some of the weakref bugfixes (ie in the C core) may be relevant
> although it I may also have accidentally the usage in such a way that
> it works around the problems.

To my knowledge, the weakref stuff fixes some edge cases that you 
probably don't have.  Those bugs have been in weakref for a long time.

>> If you want to build with a newer version of Python, go ahead, 
>> there's nothing stopping you and py2app will do the right thing.  
>> Simply invoke setup.py with the python you want included in the 
>> application bundle.  The system Python is a special case in that it 
>> *refuses* to copy it into the bundle for various reasons.
>
> On Linux the pydotorg Python does install into a different directory
> structure and all works fine (the base Python on Redhat 9 is 2.2).
> I'm sure py2app works fine, but it is trivial compared to my other
> dependencies, especially wxPython.  The wxPython page says:
>
>   wxPythonOSX needs a "Framework" build of Python 2.3, also known   as 
> MacPython-OSX. If you have OSX 10.3 (Panther) then you already   have 
> what you need ...

Yeah, if you want to use a non-system Python with an extension built 
with the system Python there are some potential issues.  Specifically, 
if the extensions were built without PantherPythonFix, then they will 
crash on import unless they have been run through py2app (but not with 
the alias bundle option, it does not touch extensions).  Otherwise, if 
they were built with the fix, then they do not directly reference any 
Python so it is simply ok to just copy them somewhere on the sys.path 
of your non-system Python.

I could write a script (similar to macho_standalone) that sanitizes 
Python extensions so that they may be used with a different Python of 
the same major version, but except for 10.2, the real solution is just 
to use PantherPythonFix and recompile (relink really).

>> But my point was that you only need to build on the lowest common 
>> denominator and it will work everywhere else.
>
> No, your point was that it *should* work everywhere else.  A failure
> to work everywhere else has already happened to us once and who knows
> what will actually happen when Tiger comes out.  (I am definitely 
> intending to drop 10.2 support at that point).

This failure was probably due to the fact that you were not using 
py2app at the time.  I bet it was a Version Mismatch issue because the 
extensions that went into the bundle directly referenced 
/Library/Frameworks/Python.framework and the user had a Python 
installed there.  The application would then have two Python 
interpreters in-process and when that happens it goes BOOM.

If you are embedding a non-system Python with py2app, then you will not 
have this issue.

(dropping 10.2 support is going to be a dream come true).

-bob



More information about the Pythonmac-SIG mailing list