]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Fix problem on Mandriva 2006 64-bit with vtk Python modules importing
authorvsr <vsr@opencascade.com>
Mon, 15 Jan 2007 09:29:26 +0000 (09:29 +0000)
committervsr <vsr@opencascade.com>
Mon, 15 Jan 2007 09:29:26 +0000 (09:29 +0000)
config_files/VTK-4.2.6.sh
config_files/patches/vtk-4.2.6-patented.patch [new file with mode: 0755]

index bc4f12002ace5056ed8a85d0ace6ea3cdd56bdd4..6a5852cf0cf386603df44da54e85a7126a6c6bf0 100755 (executable)
@@ -90,6 +90,10 @@ if test `uname -m` = "x86_64" ; then
        cp patches/vtk-4.2.6-lib64.patch ${PRODUCT_WORK}
        ( cd ${PRODUCT_WORK} ; patch -p1 < vtk-4.2.6-lib64.patch )
     fi
+    if [ -f patches/vtk-4.2.6-patented.patch ] ; then
+       cp patches/vtk-4.2.6-patented.patch ${PRODUCT_WORK}
+       ( cd ${PRODUCT_WORK} ; patch -p1 < vtk-4.2.6-patented.patch )
+    fi
 fi
 
 cd ${INSTALL_WORK}/cmake-1.6.6 
diff --git a/config_files/patches/vtk-4.2.6-patented.patch b/config_files/patches/vtk-4.2.6-patented.patch
new file mode 100755 (executable)
index 0000000..0e22d08
--- /dev/null
@@ -0,0 +1,13 @@
+diff -Naur VTK-4.2.6-original/Wrapping/Python/vtk/__helper.py VTK-4.2.6-patched/Wrapping/Python/vtk/__helper.py
+--- VTK-4.2.6-original/Wrapping/Python/vtk/__helper.py 2001-10-31 23:30:50.000000000 +0300
++++ VTK-4.2.6-patched/Wrapping/Python/vtk/__helper.py  2007-01-15 12:23:15.631470353 +0300
+@@ -9,7 +9,8 @@
+     """ Checks to see if the ImportError was because the library
+     itself was not there or because there was a link error.  If there
+     was a link error it raises a LinkError if not it does nothing."""
+-    del sys.modules['vtk.%s'%mod_name]
++    if sys.modules.has_key('vtk.%s'%mod_name):
++      del sys.modules['vtk.%s'%mod_name]
+     mod = 'vtk' + string.upper(mod_name[0]) + mod_name[1:] +'Python'
+     if string.find(str(exc), mod) == -1:
+       raise LinkError, str(exc)