[issue15498] Eliminate the use of deprecated OS X APIs in getpath.c

Ronald Oussoren report at bugs.python.org
Tue Jul 31 14:03:04 CEST 2012


Ronald Oussoren added the comment:

Removing the dependency on NSLookupAndBindSymbol (and related APIs) is easier than I expected.

The attached patch (issue15498-v1.txt) uses dladdr to get symbol information for Py_Initialize and that information includes the path for the library where that symbol is located (that is the framework).

The patch has seen only light testing, in particular: I've verified that the library path has the expected value, but haven't run the full test suite set.

TODO:
- Run test full test suite with a framework build (both before and after
  installing)
- Likewise for a regular unix build
- Likewise for a regular unix build with --enable-shared

This patch should work on OSX 10.4 or later, and may also work on OSX 10.3, the manpage for dladdr is not entirely clear on whether or not the symbol is available in libSystem on OSX 10.3.

----------
keywords: +needs review
stage: needs patch -> patch review
Added file: http://bugs.python.org/file26622/issue15498-v1.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15498>
_______________________________________


More information about the Python-bugs-list mailing list