[Pythonmac-SIG] Yet another problem with two Pythons on Panther
Stuart Bishop
stuart.b at commonground.com.au
Sun Dec 7 19:48:56 EST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/12/2003, at 9:19 AM, Jack Jansen wrote:
> On 7-dec-03, at 1:55, Stuart Bishop wrote:
>> On 06/12/2003, at 1:05 AM, Jack Jansen wrote:
>>
>>> This could probably be fixed by adding a
>>> -F/System/Library/Frameworks to the builds, but I don't think we can
>>> do this for the existing 10.3/2.3 distribution. Or can someone think
>>> of a workaround?
>>
>> Add /Library/Python/2.3/sitecustomize.py:
>>
>> # Add a directory to the start of sys.path so we can override
>> # modules shipped with OSX without actually modifying anything in
>> # /System
>> import sys
>> if sys.version_info[:3] == (2, 3, 0):
>> sys.path.insert(0, '/Library/Python/2.3.0-patches')
>
> Good idea!!
>
> Unfortunately, it won't fly:-(
>
> Because what we need to edit is the Makefile in
> $prefix/lib/python2.3/config: this is where distutils picks up the
> configuration variables to use during build.
But the point is we won't be running standard distutils after adding
the above sitecustomize.py, but a patched version that can define any
behavior we like. Sounds like the only patch needed to distutils would
be to hard code the extra option in the parse_makefile function in
distutils/sysconfig.py. Or just alter the get_makefile_filename
function to use a different Makefile.
It won't work for modules using the pre-distutils build methods, but
they
are getting pretty rare (?).
- --
Stuart Bishop <stuart at stuartbishop.net>
http://www.stuartbishop.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD4DBQE/08qAAfqZj7rGN0oRAoAMAJdurTzYHjXr/wHzWUML6zvSWlcqAJ9R8AtM
dwmeQ5KrOwH+Ayqgt4qqmw==
=I0MI
-----END PGP SIGNATURE-----
More information about the Pythonmac-SIG
mailing list