diff options
author | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
commit | 7a65a910b77ad191d69881098c47f9b0c852d92e (patch) | |
tree | 9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/mayavi/vtk-5.10.patch | |
parent | 60da6abff6c9577a783d72865f11de7a585e912e (diff) |
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/mayavi/vtk-5.10.patch')
-rw-r--r-- | community/mayavi/vtk-5.10.patch | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/community/mayavi/vtk-5.10.patch b/community/mayavi/vtk-5.10.patch new file mode 100644 index 000000000..34fbbcf34 --- /dev/null +++ b/community/mayavi/vtk-5.10.patch @@ -0,0 +1,83 @@ +From e61d4afa02072b48a332c7250b293704f57c6b2a Mon Sep 17 00:00:00 2001 +From: "mluessi@nmr.mgh.harvard.edu" <mluessi@nmr.mgh.harvard.edu> +Date: Mon, 9 Jul 2012 17:48:20 -0400 +Subject: [PATCH 01/13] FIX: version comp. for VTK 5.10 + +--- + mayavi/modules/text.py | 8 +++++--- + tvtk/tools/mlab.py | 5 +++-- + 2 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/mayavi/modules/text.py b/mayavi/modules/text.py +index 1fcc0e0..d1c79c0 100644 +--- a/mayavi/modules/text.py ++++ b/mayavi/modules/text.py +@@ -5,6 +5,8 @@ + # Copyright (c) 2005, Enthought, Inc. + # License: BSD Style. + ++from distutils.Version import StrictVersion ++ + # Enthought library imports. + from traits.api import Instance, Range, Str, Bool, Property, \ + Float +@@ -16,7 +18,7 @@ from apptools.persistence import state_pickler + from mayavi.core.module import Module + from mayavi.core.pipeline_info import PipelineInfo + +-VTK_VER = float(tvtk.Version().vtk_version[:3]) ++VTK_VER = StrictVersion(tvtk.Version().vtk_version) + + + ###################################################################### +@@ -68,7 +70,7 @@ class Text(Module): + ######################################## + # The view of this object. + +- if VTK_VER > 5.1: ++ if VTK_VER > '5.1': + _text_actor_group = Group(Item(name='visibility'), + Item(name='text_scale_mode'), + Item(name='alignment_point'), +@@ -152,7 +154,7 @@ class Text(Module): + set the `actors` attribute up at this point. + """ + actor = self.actor = tvtk.TextActor(input=str(self.text)) +- if VTK_VER > 5.1: ++ if VTK_VER > '5.1': + actor.set(text_scale_mode='prop', width=0.4, height=1.0) + else: + actor.set(scaled_text=True, width=0.4, height=1.0) +diff --git a/tvtk/tools/mlab.py b/tvtk/tools/mlab.py +index 8262da0..dfe9230 100644 +--- a/tvtk/tools/mlab.py ++++ b/tvtk/tools/mlab.py +@@ -92,6 +92,7 @@ functions:: + # Copyright (c) 2005-2007, Enthought, Inc. + # License: BSD Style. + ++from distutils.Version import StrictVersion + + import numpy + +@@ -107,7 +108,7 @@ from tvtk.tools import ivtk + # Set this to False to not use LOD Actors. + USE_LOD_ACTOR = True + +-VTK_VER = float(tvtk.Version().vtk_version[:3]) ++VTK_VER = StrictVersion(tvtk.Version().vtk_version) + + ###################################################################### + # Utility functions. +@@ -639,7 +640,7 @@ class Title(MLabBase): + super(Title, self).__init__(**traits) + + ta = self.text_actor +- if VTK_VER > 5.1: ++ if VTK_VER > '5.1': + ta.set(text_scale_mode='prop', height=0.05, input=self.text) + else: + ta.set(scaled_text=True, height=0.05, input=self.text) +-- +1.7.12 + |