On Mar 6, 2006, at 12:20 AM, Zachary Pincus wrote: >>> (2) Move to using dlopen() to load the libraries instead of >>> NSLinkImage. This might need some minor changes to >>> dynload_shlib.c, and it would need the configure script to be >>> smart enough to choose dynload_next.c on 10.2 and below. >> >> If you come up with a patch for (2) against Python's svn trunk >> that is tested and works on 10.2 then I'll commit it. It's not >> appropriate to make this sort of change against Python 2.4, >> though. *Maybe* for the universal branch that Ronald and I are >> doing, because that's also unlikely to be merged with the 2.4 branch. > > Here's the patch, in all its glory. > > --- configure.in (revision 42867) > +++ configure.in (working copy) > @@ -2105,7 +2105,8 @@ > - Darwin/*) DYNLOADFILE="dynload_next.o";; > + # use dynload_next.o only on darwin versions without dlopen(). > + Darwin/@<:@0123456@:>@.*) DYNLOADFILE="dynload_next.o";; > > (Also, autoconf must be re-run to generate a new configure file > from the patched configure.in.) > > I just built python with this patch and it passes all of the tests > on 10.4. Is there anything else I should test, or will the dynload > functionality be tested plenty by the standard tests? (I assume > that's the case.) > > I don't have access to a 10.2 machine currently, so if someone is > able to test this patch on 10.1, 10.2, and/or 10.3, I would be most > grateful. I can try to find some 10.2 install disks (and hope that > my computer can run 10.2) if nobody has easy access to such a machine.
I think the Mac OS X box on the sourceforge compile farm may be 10.2. > One last thing -- given that OS X now has dlfcn.h and dlopen(), > will the library dl module now work? Right now, setup.py won't > build dlmodule.c on darwin, even if it can find dlfcn.h. Does > anyone know the reason for this is still valid for 10.3 or 10.4? That module should be available on 10.3+ (but isn't, obviously), but it's not all that useful on its own. I'd just use ctypes instead, especially since it's slated for inclusion with Python 2.5. -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig