On Mar 5, 2006, at 12:32 PM, Zachary Pincus wrote: >>> [need to share symbols across dso boundaries snipped] >>> Any help or suggestions or thoughts would be greatly appreciated, >> >> Don't do that? >> >> Python uses two-level namespaces on OSX, and for a purpose: to avoid >> accidentally picking up a symbol from another extension. IIRC You >> should >> build a shared library containing the shared code and link all >> extensions >> to that. > > Hmm, this is not exactly what I was hoping to hear. > > About building python with a two-level namespace: isn't the best way > to not pick up symbols from other extensions to not load the > extensions with the RTLD_GLOBAL flag? Solving the problem with two- > level namespaces seems a bit extreme... though perhaps there are > other good reasons for this?
Actually it's because Python extensions are bundles. Bundles are NOT shared libraries and can not do what you want. Additionally, Python on Mac OS X doesn't use dl to load its extensions, it uses lower- level means... so the RTLD flags aren't going to do anything. The "best" you can do is to build shared libraries that all of your extensions link to. Phillip J Eby has done some work in order to allow setuptools to build shared libraries and to have them work with eggs. There's probably some discussion about that in distutils-sig. -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig