From: vsr Date: Mon, 15 Jan 2007 09:29:26 +0000 (+0000) Subject: Fix problem on Mandriva 2006 64-bit with vtk Python modules importing X-Git-Tag: V_3_2_4~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=622b6bf9e57d8f066704050fee4ab86289d8142c;p=tools%2Finstall.git Fix problem on Mandriva 2006 64-bit with vtk Python modules importing --- diff --git a/config_files/VTK-4.2.6.sh b/config_files/VTK-4.2.6.sh index bc4f120..6a5852c 100755 --- a/config_files/VTK-4.2.6.sh +++ b/config_files/VTK-4.2.6.sh @@ -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 index 0000000..0e22d08 --- /dev/null +++ b/config_files/patches/vtk-4.2.6-patented.patch @@ -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)