]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix for issue #7473.
authorRonald Oussoren <ronaldoussoren@mac.com>
Wed, 20 Oct 2010 13:10:12 +0000 (13:10 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Wed, 20 Oct 2010 13:10:12 +0000 (13:10 +0000)
Without this patch you'll get link errors in some extensions
(in particular the _curses_panel) one when you try to build
a 3-way universal framework when you previously installed a
2-way universal framework using the python.org installer.

Misc/NEWS
setup.py

index ccab30adaa5a0b36f1dac299d84c435bd38f7089..16dad49f676042c4f5ba5ff42277d779e114cdb5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -141,6 +141,9 @@ Build
 
 - Accept Oracle Berkeley DB 5.0 and 5.1 as backend for the dbm extension.
 
+- Issue #7473: avoid link errors when building a framework with a different
+  set of architectures than the one that is currently installed.
+
 
 What's New in Python 3.2 Alpha 3?
 =================================
index 549eccbb451b4d73e0536166a6be3d7ae58a4b88..3cdcea17b8ea8a25902855378e56c689da33833a 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -400,7 +400,12 @@ class PyBuildExt(build_ext):
                     for directory in reversed(options.dirs):
                         add_dir_to_list(dir_list, directory)
 
-        if os.path.normpath(sys.prefix) != '/usr':
+        if os.path.normpath(sys.prefix) != '/usr' \
+                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
+            # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
+            # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+            # building a framework with different architectures than
+            # the one that is currently installed (issue #7473)
             add_dir_to_list(self.compiler.library_dirs,
                             sysconfig.get_config_var("LIBDIR"))
             add_dir_to_list(self.compiler.include_dirs,