[Python-checkins] r43748 - in python/trunk: Lib/test/regrtest.py Lib/test/test_dl.py Misc/ACKS Misc/NEWS configure configure.in setup.py

anthony.baxter python-checkins at python.org
Sun Apr 9 17:07:42 CEST 2006


Author: anthony.baxter
Date: Sun Apr  9 17:07:40 2006
New Revision: 43748

Modified:
   python/trunk/Lib/test/regrtest.py
   python/trunk/Lib/test/test_dl.py
   python/trunk/Misc/ACKS
   python/trunk/Misc/NEWS
   python/trunk/configure
   python/trunk/configure.in
   python/trunk/setup.py
Log:
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)


Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py	(original)
+++ python/trunk/Lib/test/regrtest.py	Sun Apr  9 17:07:40 2006
@@ -945,7 +945,6 @@
         test_cd
         test_cl
         test_curses
-        test_dl
         test_gdbm
         test_gl
         test_imgfile

Modified: python/trunk/Lib/test/test_dl.py
==============================================================================
--- python/trunk/Lib/test/test_dl.py	(original)
+++ python/trunk/Lib/test/test_dl.py	Sun Apr  9 17:07:40 2006
@@ -10,6 +10,7 @@
     ('/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:

Modified: python/trunk/Misc/ACKS
==============================================================================
--- python/trunk/Misc/ACKS	(original)
+++ python/trunk/Misc/ACKS	Sun Apr  9 17:07:40 2006
@@ -478,6 +478,7 @@
 Dan Pierson
 Martijn Pieters
 François Pinard
+Zach Pincus
 Michael Piotrowski
 Iustin Pop
 John Popplewell

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sun Apr  9 17:07:40 2006
@@ -12,6 +12,12 @@
 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
 -----------------
 

Modified: python/trunk/configure
==============================================================================
--- python/trunk/configure	(original)
+++ python/trunk/configure	Sun Apr  9 17:07:40 2006
@@ -10819,7 +10819,7 @@
 
 
 case $ac_sys_system/$ac_sys_release in
-  Darwin/[01234567].*)
+  Darwin/[01567]\..*)
     OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
     ;;
   Darwin/*)
@@ -10829,7 +10829,7 @@
 
 
 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 @@
 	;;
 	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

Modified: python/trunk/configure.in
==============================================================================
--- python/trunk/configure.in	(original)
+++ python/trunk/configure.in	Sun Apr  9 17:07:40 2006
@@ -1259,7 +1259,7 @@
 
 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 @@
 
 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 @@
 	;;
 	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

Modified: python/trunk/setup.py
==============================================================================
--- python/trunk/setup.py	(original)
+++ python/trunk/setup.py	Sun Apr  9 17:07:40 2006
@@ -969,7 +969,7 @@
         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


More information about the Python-checkins mailing list