[Pythonmac-SIG] Re: dynload_next patch - still waiting for feedback

Jack Jansen Jack.Jansen@oratrix.com
Tue, 19 Feb 2002 16:07:40 +0100


On Friday, February 15, 2002, at 12:37 , Manoj Plakal wrote:
>             Based on my little knowledge of OS X linking gleaned
>             from Apple's docs, it seems to me that 2-level namespaces
>             provide the right behavior for Python modules, and
>             this is behavior consistent with other platforms too.

I started on making Python completely 2-level namespace based, but it 
turns out to be non-trivial. I'm running into two problems, and there 
doesn't seem to be an easy solution for either.

The first problem is that _environ is declared in crt0 which is linked 
into the main program, not into the Python.framework shared library, and 
I can't use the -bundle-loader trick to tell that to ld as the main 
program isn't there yet when we're building the shared library. I 
haven't tried a non-framework Python yet, I think it may not have this 
problem.

The second problem is that the -bundle-loader option for a non-framework 
Python should point to two different locations (either the installed 
Python or the one in the build directory) depending on whether we're 
running the setup.py in the build directory as a part of the initial 
install of Python or we're running a different setup.py that is building 
an extension module for an already installed Python.

If anyone has suggestions on how to fix these: please speak up!
--
- 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 -