]> granicus.if.org Git - python/commitdiff
Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
authorAnthony Baxter <anthonybaxter@gmail.com>
Sun, 9 Apr 2006 15:07:40 +0000 (15:07 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Sun, 9 Apr 2006 15:07:40 +0000 (15:07 +0000)
to load extension modules and now provides the dl module. As a result,
sys.setdlopenflags() now works correctly on these systems. (SF patch
#1454844)

Lib/test/regrtest.py
Lib/test/test_dl.py
Misc/ACKS
Misc/NEWS
configure
configure.in
setup.py

index 11090867507be642e82186ee68954b9a9ce2cb55..224a2a09dc39d5ed95ce97d5e924d903ecc69529 100755 (executable)
@@ -945,7 +945,6 @@ _expectations = {
         test_cd
         test_cl
         test_curses
-        test_dl
         test_gdbm
         test_gl
         test_imgfile
index d1f73b2e04ced9dad9722d9acd319f58ad411169..b70a4cfee24b5440f0ff887ea6da7e746e6a60d7 100755 (executable)
@@ -10,6 +10,7 @@ sharedlibs = [
     ('/usr/lib/libc.so', 'getpid'),
     ('/lib/libc.so.6', 'getpid'),
     ('/usr/bin/cygwin1.dll', 'getpid'),
+    ('/usr/lib/libc.dylib', 'getpid'),
     ]
 
 for s, func in sharedlibs:
index 04b6c77105cb0dd6f010a2c5ea303b6f1390304b..a824a869e1184b71c9725051feb958f44d2ae22a 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -478,6 +478,7 @@ Jean-Fran
 Dan Pierson
 Martijn Pieters
 François Pinard
+Zach Pincus
 Michael Piotrowski
 Iustin Pop
 John Popplewell
index b7f46ba1343744b4b439be38d71dcca287859421..0a26e91fc96bce1fa6b9cece3fceaf648900aa11 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,12 @@ What's New in Python 2.5 alpha 2?
 Core and builtins
 -----------------
 
+- Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c) 
+  to load extension modules and now provides the dl module. As a result,
+  sys.setdlopenflags() now works correctly on these systems. (SF patch 
+  #1454844)
+
+
 Extension Modules
 -----------------
 
index e65c85b4eee8fe36cf3a4f5265a589840818164a..f8183f2c6c487d5e71bcfcb01fb6b0875bff9072 100755 (executable)
--- a/configure
+++ b/configure
@@ -10819,7 +10819,7 @@ echo "${ECHO_T}$enable_toolbox_glue" >&6
 
 
 case $ac_sys_system/$ac_sys_release in
-  Darwin/[01234567].*)
+  Darwin/[01567]\..*)
     OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
     ;;
   Darwin/*)
@@ -10829,7 +10829,7 @@ esac
 
 
 case $ac_sys_system/$ac_sys_release in
-  Darwin/[01234567].*)
+  Darwin/[01567]\..*)
     LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only `arch`"
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -13980,7 +13980,8 @@ then
        ;;
        BeOS*) DYNLOADFILE="dynload_beos.o";;
        hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
-       Darwin/*) DYNLOADFILE="dynload_next.o";;
+       # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
+       Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
        atheos*) DYNLOADFILE="dynload_atheos.o";;
        *)
        # use dynload_shlib.c and dlopen() if we have it; otherwise stub
index 2f4df3f2126344dd4a1ac9407e3697c6d240377a..612d2fa91b3bb2d08a974de402091d54f5f88c1c 100644 (file)
@@ -1259,7 +1259,7 @@ AC_MSG_RESULT($enable_toolbox_glue)
 
 AC_SUBST(OTHER_LIBTOOL_OPT)
 case $ac_sys_system/$ac_sys_release in
-  Darwin/@<:@01234567@:>@.*) 
+  Darwin/@<:@01567@:>@\..*) 
     OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
     ;;
   Darwin/*)
@@ -1269,7 +1269,7 @@ esac
 
 AC_SUBST(LIBTOOL_CRUFT)
 case $ac_sys_system/$ac_sys_release in
-  Darwin/@<:@01234567@:>@.*) 
+  Darwin/@<:@01567@:>@\..*) 
     LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only `arch`"
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
@@ -2110,7 +2110,8 @@ then
        ;;
        BeOS*) DYNLOADFILE="dynload_beos.o";;
        hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
-       Darwin/*) DYNLOADFILE="dynload_next.o";;
+       # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
+       Darwin/@<:@0156@:>@\..*) DYNLOADFILE="dynload_next.o";;
        atheos*) DYNLOADFILE="dynload_atheos.o";;
        *)
        # use dynload_shlib.c and dlopen() if we have it; otherwise stub
index 065a11587895e5a254d85d239141e0e547cbed60..eea9ee8aad864d9bd63b76c73715334d5e91c873 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -969,7 +969,7 @@ class PyBuildExt(build_ext):
         if sys.maxint == 0x7fffffff:
             # This requires sizeof(int) == sizeof(long) == sizeof(char*)
             dl_inc = find_file('dlfcn.h', [], inc_dirs)
-            if (dl_inc is not None) and (platform not in ['atheos', 'darwin']):
+            if (dl_inc is not None) and (platform not in ['atheos']):
                 exts.append( Extension('dl', ['dlmodule.c']) )
 
         # Thomas Heller's _ctypes module