[Python-apps-commits] r1057 - in packages/mayavi2/trunk/debian (6 files)

varun at users.alioth.debian.org varun at users.alioth.debian.org
Tue May 13 12:14:39 UTC 2008


    Date: Tuesday, May 13, 2008 @ 12:14:37
  Author: varun
Revision: 1057

Add plot3d_reader.diff patch from upstream, fixes issues with reading
plot3d data files.

Added:
  packages/mayavi2/trunk/debian/patches/
  packages/mayavi2/trunk/debian/patches/plot3d_reader.diff
  packages/mayavi2/trunk/debian/patches/series
Modified:
  packages/mayavi2/trunk/debian/changelog
  packages/mayavi2/trunk/debian/control
  packages/mayavi2/trunk/debian/rules

Modified: packages/mayavi2/trunk/debian/changelog
===================================================================
--- packages/mayavi2/trunk/debian/changelog	2008-05-12 18:12:54 UTC (rev 1056)
+++ packages/mayavi2/trunk/debian/changelog	2008-05-13 12:14:37 UTC (rev 1057)
@@ -1,3 +1,10 @@
+mayavi2 (2.1.1-3) unstable; urgency=low
+
+  * Add plot3d_reader.diff patch from upstream, fixes issues with reading
+    plot3d data files.
+
+ -- Varun Hiremath <varun at debian.org>  Tue, 13 May 2008 17:58:35 +0530
+
 mayavi2 (2.1.1-2) unstable; urgency=low
 
   * Change Build-Depends: python-central (>= 0.6.0) (Closes: #472032)

Modified: packages/mayavi2/trunk/debian/control
===================================================================
--- packages/mayavi2/trunk/debian/control	2008-05-12 18:12:54 UTC (rev 1056)
+++ packages/mayavi2/trunk/debian/control	2008-05-13 12:14:37 UTC (rev 1057)
@@ -4,7 +4,7 @@
 Maintainer: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
 Uploaders: Ondrej Certik <ondrej at certik.cz>, Marco Rodrigues <gothicx at sapo.pt>, Varun Hiremath <varun at debian.org>
 Build-Depends: cdbs, debhelper (>= 5), python-all-dev, python-central (>= 0.6.0),
- python-setuptools, python-vtk, python-numpy
+ python-setuptools, python-vtk, python-numpy, quilt
 Standards-Version: 3.7.3
 Vcs-Svn: svn://svn.debian.org/svn/python-apps/packages/mayavi2/trunk
 Vcs-Browser: http://svn.debian.org/wsvn/python-apps/packages/mayavi2/trunk/

Added: packages/mayavi2/trunk/debian/patches/plot3d_reader.diff
===================================================================
--- packages/mayavi2/trunk/debian/patches/plot3d_reader.diff	                        (rev 0)
+++ packages/mayavi2/trunk/debian/patches/plot3d_reader.diff	2008-05-13 12:14:37 UTC (rev 1057)
@@ -0,0 +1,91 @@
+diff -urN mayavi2-2.1.1.orig/enthought.mayavi/enthought/mayavi/sources/plot3d_reader.py mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/sources/plot3d_reader.py
+--- mayavi2-2.1.1.orig/enthought.mayavi/enthought/mayavi/sources/plot3d_reader.py	2008-05-13 17:54:33.000000000 +0530
++++ mayavi2-2.1.1/enthought.mayavi/enthought/mayavi/sources/plot3d_reader.py	2008-05-13 17:55:15.000000000 +0530
+@@ -19,7 +19,7 @@
+ 
+ # Local imports.
+ from enthought.mayavi.core.source import Source
+-from enthought.mayavi.core.common import handle_children_state
++from enthought.mayavi.core.common import handle_children_state, error
+ 
+ 
+ ########################################################################
+@@ -131,6 +131,10 @@
+         time series, this initializes the list of files.  This method
+         need not be called to initialize the data.
+         """
++        # First set properties of the reader.  This is useful when the
++        # data format has atypical defaults.  Automatic detection can be
++        # disastrous sometimes due to VTK related problems.
++        self.reader.edit_traits(kind='livemodal')
+         self.xyz_file_name = xyz_file_name
+         if len(q_file_name) > 0:
+             self.q_file_name = q_file_name
+@@ -164,32 +168,51 @@
+     def _update_reader_output(self):
+         r = self.reader
+         r.update()
+-        if r.output.points is None:
++
++        if r.error_code != 0:
+             try:
+                 self.reader.i_blanking = True
+             except AttributeError:
+                 pass
+-        r.update()
++            else:
++                r.update()
++
+         # Try reading file.
+-        if r.output.points is None:
++        if r.error_code != 0:
+             # No output so the file might be an ASCII file.
+             try:
+                 # Turn off IBlanking.
+                 r.set(i_blanking = False, binary_file = False)
+             except AttributeError:
+                 pass
+-            
++            else:
++                r.update()
++
+         # Try again this time as ascii and with blanking.
+-        r.update()
+-        if r.output.points is None:
++        if r.error_code != 0:
+             # No output so the file might be an ASCII file.
+             try:
+                 # Turn on IBlanking.
+                 r.i_blanking = True
+             except AttributeError:
+                 pass
++            else:
++                r.update()
++
++        # If there still is an error, ask the user.
++        if r.error_code != 0:
++            r.edit_traits(kind='livemodal')
++            r.update()
++
++        # If there still is an error, ask the user to retry.
++        if r.error_code != 0:
++            msg = 'Unable to read file properly. '\
++                  'Please check the settings of the reader '\
++                  'on the UI and press the "Update Reader" button '\
++                  'when done and try again!'
++            error(msg)            
++            return
+ 
+-        r.update()
+         # Now setup the outputs by resetting self.outputs.  Changing
+         # the outputs automatically fires a pipeline_changed event.
+         try:
+@@ -224,7 +247,7 @@
+ 
+     def _update_reader_fired(self):
+         self.reader.modified()
+-        self.update()
++        self._update_reader_output()
+         self.pipeline_changed = True
+ 
+     def _get_name(self):

Added: packages/mayavi2/trunk/debian/patches/series
===================================================================
--- packages/mayavi2/trunk/debian/patches/series	                        (rev 0)
+++ packages/mayavi2/trunk/debian/patches/series	2008-05-13 12:14:37 UTC (rev 1057)
@@ -0,0 +1 @@
+plot3d_reader.diff

Modified: packages/mayavi2/trunk/debian/rules
===================================================================
--- packages/mayavi2/trunk/debian/rules	2008-05-12 18:12:54 UTC (rev 1056)
+++ packages/mayavi2/trunk/debian/rules	2008-05-13 12:14:37 UTC (rev 1057)
@@ -4,6 +4,7 @@
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 
 DEB_COMPRESS_EXCLUDE		:= .py .vtu .vti .vtk .wrl
 DEB_PYTHON_INSTALL_ARGS_ALL 	+= --single-version-externally-managed




More information about the Python-apps-commits mailing list