summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2006-04-09 15:07:40 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2006-04-09 15:07:40 (GMT)
commit8220174489e3f28b874b3b45516585c30e5999da (patch)
treea5b669f41c261aedf8ef1ace07418c825956c40b
parenta50794b62016e573b9f2a9e4a2a376c7360eae56 (diff)
downloadcpython-8220174489e3f28b874b3b45516585c30e5999da.zip
cpython-8220174489e3f28b874b3b45516585c30e5999da.tar.gz
cpython-8220174489e3f28b874b3b45516585c30e5999da.tar.bz2
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)
-rwxr-xr-xLib/test/regrtest.py1
-rwxr-xr-xLib/test/test_dl.py1
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS6
-rwxr-xr-xconfigure7
-rw-r--r--configure.in7
-rw-r--r--setup.py2
7 files changed, 17 insertions, 8 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 1109086..224a2a0 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -945,7 +945,6 @@ _expectations = {
test_cd
test_cl
test_curses
- test_dl
test_gdbm
test_gl
test_imgfile
diff --git a/Lib/test/test_dl.py b/Lib/test/test_dl.py
index d1f73b2..b70a4cf 100755
--- a/Lib/test/test_dl.py
+++ b/Lib/test/test_dl.py
@@ -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:
diff --git a/Misc/ACKS b/Misc/ACKS
index 04b6c77..a824a86 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -478,6 +478,7 @@ Jean-François Piéronne
Dan Pierson
Martijn Pieters
François Pinard
+Zach Pincus
Michael Piotrowski
Iustin Pop
John Popplewell
diff --git a/Misc/NEWS b/Misc/NEWS
index b7f46ba..0a26e91 100644
--- 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
-----------------
diff --git a/configure b/configure
index e65c85b..f8183f2 100755
--- 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
diff --git a/configure.in b/configure.in
index 2f4df3f..612d2fa 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/setup.py b/setup.py
index 065a115..eea9ee8 100644
--- 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