On Tue, Apr 2, 2013 at 7:19 AM, Albert-Jan Roskam <fo...@yahoo.com> wrote: >> On Windows you can also add the directory to the system PATH at >> run time. > > Ok, I'll improve that method and ditch the os.chdir calls.
Win32 LoadLibrary searches system directories, the executable's directory, the current directory, and finally PATH. It's simple to update the PATH environment variable for the current process: os.environ['PATH'] = ';'.join([absolute_lib_path, os.environ['PATH']]) You can also call kernel32.SetDllDirectoryW(absolute_lib_path) to insert a path to be searched immediately after the executable's directory. Afterward call kernel32.SetDllDirectoryW(None) to restore the normal safe search order. >> Anyway, I downloaded and extracted the deb files >> .... >> and links for the ELF soname fields > > How exactly did you do this? I extracted the debs: dpkg-deb -x <deb> <directory> Then I copied the required .so files to the lin32 directory and created the symbolic links with "ln". > Moreover, as we discussed before, I wasn't sure whether patching > the ELF header would somehow be in violation of the IBM license > agreement. I guess that including as shell script with the > savReaderWriter package with the patchelf code would be okay. The Debian repo has ICU 4.8 (libicu48). It also has libstdc++5. I'm sure the same applies to other Linux distros. That leaves only Intel's C++ libraries to be installed: libimf.so, libirc.so, and libcxaguard.so.5. I think Intel's license allows you to redistribute these with an application. Anything less would be unreasonable. But... Actually, the fact the lin32 and lin64 versions in your repo were linked to different versions of ICU made me suspicious. I decided to downloaded "IO_Module_for_SPSS_Statistics_21001.zip" (version 21) to get the lin32 directory from the source. Turns out this version doesn't depend on Intel's libs at all, and it's linked to the ICU 4.8 libs and libstdc++.so.6. It does add libzlib123spss.so, but that's simple to preload. In fact, if you'd rather not tinker with PATH on Windows, or install libraries to the system, or patch the ELF runpath -- then you could simply load the required libraries manually in the following sequence (version 21): Linux Windows ------------------------------------- libicudata.so.48.1 icudt48.dll libicuuc.so.48.1 icuuc48.dll libicui18n.so.48.1 icuin48.dll libzlib123spss.so zlib123spss.dll libspssdio.so.1 spssio32.dll [spssio64.dll] _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor