[Pythonmac-SIG] Building 2.4
Bob Ippolito
bob at redivi.com
Fri Dec 3 18:05:47 CET 2004
On Dec 3, 2004, at 10:55, Ronald Oussoren wrote:
>
> On 3-dec-04, at 15:23, Jack Jansen wrote:
>
>>
>> On 3 Dec 2004, at 10:56, Ronald Oussoren wrote:
>>> It would also be possible to monkey-patch the 2.3 install. IIRC I've
>>> posted one way to do a long time ago. That message should be in the
>>> archives.
>>>
>>> The advantage would be that you do not have to patch files in
>>> /System, we could even use this to install include files outside of
>>> /System while keeping them functional. The disadvantage is that my
>>> approach seems to induce vomitting in some people ;-)
>>
>> I assume that was me:-)
>
> Me too :-)
>
>>
>> But I can't for the life of me remember how you did it. Do you have a
>> reference?
>
> I don't have a reference, but I do remember what I did:
>
> 1) Create a .pth file containing::
>
> import sys; sys.path.insert(0, '/Library/Python/2.3/python-fixes')
>
> 2) In /Library/Python/2.3 create a distutils package with only a
> __init__.py.
>
> That __init__.py should extend/set the __path__, to make sure we
> can import the
> rest of distutils. It should then 'execfile' the real
> distutils.__init__ and finally
> patch up distutils.
>
> This is a gross hack, but is a relatively clean way to perform
> non-invasive surgery on an existing python installation. At least it
> doesn't requiry people to use the shell and sudo (both of which are
> scary for lots of peoply).
>
> I'll see if I can build a working example for this tomorrow.
It would be easier to just build a .pkg installer that has a preflight
script that checks for OS X 10.3.x, and does the patch.
-bob
More information about the Pythonmac-SIG
mailing list