[ python-Bugs-856401 ] Definitive way to link to the correct
Python.framework
SourceForge.net
noreply at sourceforge.net
Mon Dec 8 14:31:26 EST 2003
Bugs item #856401, was opened at 2003-12-08 14:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=856401&group_id=5470
Category: Macintosh
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Bob Ippolito (etrepum)
Assigned to: Jack Jansen (jackjansen)
Summary: Definitive way to link to the correct Python.framework
Initial Comment:
The link target for Python should be specified by
introspecting the Python framework itself and linking directly
to the framework dylib, rather than using -framework and
overriding the framework search path with -F. Using -F may
have undesirable side-effects.
Example: User has Python at /Library/Frameworks and
wants to build an extension module that links to ~/Library/
Frameworks/FooFramework.framework. User also has a /
Library/Frameworks/FooFramework.framework that they do
not want to link against.
Solution: Rather than -framework Python, Python should
link directly to
NSBundle.bundleWithIdentifier_('org.python.Python.framewor
k').executablePath(). Stock 10.3 has this located at:
u'/System/Library/Frameworks/Python.framework/Python'.
The value of this is entirely dependent on the current running
version of Python that the extension module will be linked
against. The dylib identifier will of course be expanded to
the full /System/Library/Frameworks/Python.framework/
Versions/2.3/Python by the linker.
Caveats: Example requires PyObjC, however these APIs are
available in CoreFoundation's CFBundle and could easily be
put into an extension module if PyObjC is not to be
distributed with the next version of Python. It will likely
require a platform specific patch to distutils.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=856401&group_id=5470
More information about the Python-bugs-list
mailing list