nad0011 OS X installer: clean build can fail on import checks ANALYSIS The OS X installer build include several third-party libraries which will be installed as shared libs in the framework. During the build, setup.py tries to import built extensions to catch import problems. Currently, the import check attempts to load the shared libs from their installed location. If the version being built is not installed on the build machine, the build fails; if present, the imports are checked against the old libraries. Problems seen with _curses_panel on all builds and, for 4-way universal, _curses and readlines. SOLUTION add the extra libs into the DYLD_LIBRARY_PATH of the interpreter during the build phase APPLIES 2.6, 2.7, 3.0, 3.1 diff -r 18bfdcfbb36d Mac/BuildScript/build-installer.py --- Mac/BuildScript/build-installer.py Sat Feb 14 21:08:02 2009 -0800 +++ Mac/BuildScript/build-installer.py Sat Feb 14 21:14:18 2009 -0800 @@ -656,6 +656,11 @@ # several paths. version = getVersion() + # Since the extra libs are not in their installed framework location + # during the build, augment the library path so that the interpreter + # will find them during its extension import sanity checks. + os.environ['DYLD_LIBRARY_PATH'] = os.path.join(WORKDIR, + 'libraries', 'usr', 'local', 'lib') print "Running configure..." runCommand("%s -C --enable-framework --enable-universalsdk=%s " "--with-universal-archs=%s " @@ -677,6 +682,7 @@ runCommand("make frameworkinstallextras DESTDIR=%s"%( shellQuote(rootDir))) + del os.environ['DYLD_LIBRARY_PATH'] print "Copying required shared libraries" if os.path.exists(os.path.join(WORKDIR, 'libraries', 'Library')): runCommand("mv %s/* %s"%(