[arch-commits] Commit in mayavi/repos (12 files)

Andrzej Giniewicz aginiewicz at archlinux.org
Thu Sep 4 10:33:12 UTC 2014


    Date: Thursday, September 4, 2014 @ 12:33:12
  Author: aginiewicz
Revision: 118268

archrelease: copy trunk to community-i686, community-x86_64

Added:
  mayavi/repos/community-i686/PKGBUILD
    (from rev 118267, mayavi/trunk/PKGBUILD)
  mayavi/repos/community-i686/mayavi.csh
    (from rev 118267, mayavi/trunk/mayavi.csh)
  mayavi/repos/community-i686/mayavi.sh
    (from rev 118267, mayavi/trunk/mayavi.sh)
  mayavi/repos/community-i686/vtk-5.10.patch
    (from rev 118267, mayavi/trunk/vtk-5.10.patch)
  mayavi/repos/community-x86_64/PKGBUILD
    (from rev 118267, mayavi/trunk/PKGBUILD)
  mayavi/repos/community-x86_64/mayavi.csh
    (from rev 118267, mayavi/trunk/mayavi.csh)
  mayavi/repos/community-x86_64/mayavi.sh
    (from rev 118267, mayavi/trunk/mayavi.sh)
  mayavi/repos/community-x86_64/vtk-5.10.patch
    (from rev 118267, mayavi/trunk/vtk-5.10.patch)
Deleted:
  mayavi/repos/community-i686/PKGBUILD
  mayavi/repos/community-i686/vtk-5.10.patch
  mayavi/repos/community-x86_64/PKGBUILD
  mayavi/repos/community-x86_64/vtk-5.10.patch

---------------------------------+
 /PKGBUILD                       |  180 ++++++++++++++++++++++++++++++++++++++
 /vtk-5.10.patch                 |  166 +++++++++++++++++++++++++++++++++++
 community-i686/PKGBUILD         |   72 ---------------
 community-i686/mayavi.csh       |    1 
 community-i686/mayavi.sh        |    1 
 community-i686/vtk-5.10.patch   |   83 -----------------
 community-x86_64/PKGBUILD       |   72 ---------------
 community-x86_64/mayavi.csh     |    1 
 community-x86_64/mayavi.sh      |    1 
 community-x86_64/vtk-5.10.patch |   83 -----------------
 10 files changed, 350 insertions(+), 310 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD	2014-09-04 10:32:59 UTC (rev 118267)
+++ community-i686/PKGBUILD	2014-09-04 10:33:12 UTC (rev 118268)
@@ -1,72 +0,0 @@
-# $Id$
-# Maintainer: Andrzej Giniewicz <gginiu at gmail.com>
-
-pkgname=mayavi
-pkgver=4.3.1
-pkgrel=2
-pkgdesc="A 3-dimensional visualizer of scientific data"
-arch=('i686' 'x86_64')
-url="https://github.com/enthought/mayavi"
-license=('BSD')
-depends=('ipython2' 'vtk' 'python2-envisage' 'wxpython2.8')
-makedepends=('python2-setuptools' 'python2-sphinx' 'python2-twisted' 'xorg-server-xvfb')
-replaces=('python2-mayavi')
-provides=('python2-mayavi')
-options=(!emptydirs)
-
-source=("$pkgname-$pkgver.tar.gz::https://github.com/enthought/mayavi/archive/${pkgver}.tar.gz")
-md5sums=('93677c77f0a835537bd210c493740b03')
-
-build() {
-  cd "$srcdir"/mayavi-$pkgver
-
-  # force selection of wxpython 2.8
-  sed -e "s/wxversion.ensureMinimal('2.8')/wxversion.select('2.8')/g" -i $(find . -name '*.py')
-
-  # Use python2-sphinx provided sphinx-build2
-  sed -i -e 's/sphinx-build/sphinx-build2/' docs/Makefile*
-
-  # Fix distutils compatibility
-  sed -i -e 's/distutils.Version/distutils.version/' mayavi/modules/text.py
-  sed -i -e 's/distutils.Version/distutils.version/' tvtk/tools/mlab.py
-
-  # set path so autodoc can find just built modules
-  echo "sys.path.append('$srcdir/enthought-mayavi-${_githubtag}/build/lib.linux-$CARCH-2.7/')" >> docs/source/mayavi/conf.py
-  mkdir -p build/lib.linux-$CARCH-2.7/{tvtk/plugins/scene,mayavi/preferences,mayavi/core}
-  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/tvtk/tvtk_classes.zip \
-    build/lib.linux-$CARCH-2.7/tvtk/tvtk_classes.zip
-  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/mayavi/preferences/preferences.ini \
-    build/lib.linux-$CARCH-2.7/mayavi/preferences/preferences.ini
-  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/tvtk/plugins/scene/preferences.ini \
-    build/lib.linux-$CARCH-2.7/tvtk/plugins/scene/preferences.ini
-
-  # now this is ugly, but docs do not build without X. We setup X according to:
-  # http://docs.enthought.com/mayavi/mayavi/tips.html#rendering-using-the-virtual-framebuffer
-  export DISPLAY=:69
-  Xvfb $DISPLAY &
-
-  # build!
-  python2 setup.py build
-
-  # have to kill the server to proceed, and do other cleanup
-  kill `cat /tmp/.X${DISPLAY/:/}-lock`
-  rm build/lib.linux-$CARCH-2.7/tvtk/tvtk_classes.zip
-  rm build/lib.linux-$CARCH-2.7/mayavi/preferences/preferences.ini
-  rm build/lib.linux-$CARCH-2.7/tvtk/plugins/scene/preferences.ini
-}
-
-package() {
-  cd "$srcdir"/mayavi-$pkgver
-
-  python2 setup.py install --root="$pkgdir"/ --optimize=1
-
-  cp -r docs/build/* "${pkgdir}"/usr/lib/python2.7/site-packages
-
-  sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-    $(find "${pkgdir}" -name '*.py')
-  sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-    "$pkgdir/usr/lib/python2.7/site-packages/mayavi/tests/csv_files/csv_2_py"
-
-  install -D LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-

Copied: mayavi/repos/community-i686/PKGBUILD (from rev 118267, mayavi/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2014-09-04 10:33:12 UTC (rev 118268)
@@ -0,0 +1,90 @@
+# $Id$
+# Maintainer: Andrzej Giniewicz <gginiu at gmail.com>
+
+pkgname=mayavi
+pkgver=4.3.1
+pkgrel=3
+pkgdesc="A 3-dimensional visualizer of scientific data"
+arch=('i686' 'x86_64')
+url="https://github.com/enthought/mayavi"
+license=('BSD')
+depends=('ipython2' 'vtk' 'python2-envisage' 'python2-pyqt4')
+makedepends=('python2-setuptools' 'python2-sphinx' 'python2-twisted' 'xorg-server-xvfb')
+replaces=('python2-mayavi')
+provides=('python2-mayavi')
+options=(!emptydirs)
+
+source=("$pkgname-$pkgver.tar.gz::https://github.com/enthought/mayavi/archive/${pkgver}.tar.gz"
+        "mayavi.sh" "mayavi.csh")
+md5sums=('93677c77f0a835537bd210c493740b03'
+         '6d36bbfb69010e313292cfee4982487f'
+         '91eb92abc506a00c29afcb37c9600914')
+
+prepare() {
+  cd "$srcdir"/mayavi-$pkgver
+
+  # force selection of wxpython 2.8
+  sed -e "s/wxversion.ensureMinimal('2.8')/wxversion.select('2.8')/g" -i $(find . -name '*.py')
+
+  # Use python2-sphinx provided sphinx-build2
+  sed -i -e 's/sphinx-build/sphinx-build2/' docs/Makefile*
+
+  # Fix distutils compatibility
+  sed -i -e 's/distutils.Version/distutils.version/' mayavi/modules/text.py
+  sed -i -e 's/distutils.Version/distutils.version/' tvtk/tools/mlab.py
+
+  # set path so autodoc can find just built modules
+  echo "sys.path.append('$srcdir/enthought-mayavi-${_githubtag}/build/lib.linux-$CARCH-2.7/')" >> docs/source/mayavi/conf.py
+
+  # fix python->python2
+  sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+      -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+      -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+      -i $(find . -name '*[\._]py')
+}
+
+build() {
+  cd "$srcdir"/mayavi-$pkgver
+  rm -rf build
+  mkdir build
+  mkdir -p build/lib.linux-$CARCH-2.7/{tvtk/plugins/scene,mayavi/preferences,mayavi/core}
+  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/tvtk/tvtk_classes.zip \
+    build/lib.linux-$CARCH-2.7/tvtk/tvtk_classes.zip
+  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/mayavi/preferences/preferences.ini \
+    build/lib.linux-$CARCH-2.7/mayavi/preferences/preferences.ini
+  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/tvtk/plugins/scene/preferences.ini \
+    build/lib.linux-$CARCH-2.7/tvtk/plugins/scene/preferences.ini
+
+  # force using Qt during build
+  export ETS_TOOLKIT=qt4
+
+  # now this is ugly, but docs do not build without X. We setup X according to:
+  # http://docs.enthought.com/mayavi/mayavi/tips.html#rendering-using-the-virtual-framebuffer
+  export DISPLAY=:69
+  Xvfb $DISPLAY &
+
+  # build!
+  python2 setup.py build
+
+  # have to kill the server to proceed, and do other cleanup
+  kill `cat /tmp/.X${DISPLAY/:/}-lock`
+  rm build/lib.linux-$CARCH-2.7/tvtk/tvtk_classes.zip
+  rm build/lib.linux-$CARCH-2.7/mayavi/preferences/preferences.ini
+  rm build/lib.linux-$CARCH-2.7/tvtk/plugins/scene/preferences.ini
+}
+
+package() {
+  cd "$srcdir"/mayavi-$pkgver
+
+  python2 setup.py install --root="$pkgdir"/ --optimize=1
+
+  cp -r docs/build/* "${pkgdir}"/usr/lib/python2.7/site-packages
+
+  # switch to PyQt by default, fix FS#41791
+  install -d "${pkgdir}"/etc/profile.d
+  install -Dm644 "${srcdir}"/mayavi.sh "${pkgdir}"/etc/profile.d/mayavi.sh
+  install -Dm644 "${srcdir}"/mayavi.csh "${pkgdir}"/etc/profile.d/mayavi.csh
+
+  install -D LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+

Copied: mayavi/repos/community-i686/mayavi.csh (from rev 118267, mayavi/trunk/mayavi.csh)
===================================================================
--- community-i686/mayavi.csh	                        (rev 0)
+++ community-i686/mayavi.csh	2014-09-04 10:33:12 UTC (rev 118268)
@@ -0,0 +1 @@
+setenv ETS_TOOLKIT "qt4"

Copied: mayavi/repos/community-i686/mayavi.sh (from rev 118267, mayavi/trunk/mayavi.sh)
===================================================================
--- community-i686/mayavi.sh	                        (rev 0)
+++ community-i686/mayavi.sh	2014-09-04 10:33:12 UTC (rev 118268)
@@ -0,0 +1 @@
+export ETS_TOOLKIT="qt4"

Deleted: community-i686/vtk-5.10.patch
===================================================================
--- community-i686/vtk-5.10.patch	2014-09-04 10:32:59 UTC (rev 118267)
+++ community-i686/vtk-5.10.patch	2014-09-04 10:33:12 UTC (rev 118268)
@@ -1,83 +0,0 @@
-From e61d4afa02072b48a332c7250b293704f57c6b2a Mon Sep 17 00:00:00 2001
-From: "mluessi at nmr.mgh.harvard.edu" <mluessi at 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
-

Copied: mayavi/repos/community-i686/vtk-5.10.patch (from rev 118267, mayavi/trunk/vtk-5.10.patch)
===================================================================
--- community-i686/vtk-5.10.patch	                        (rev 0)
+++ community-i686/vtk-5.10.patch	2014-09-04 10:33:12 UTC (rev 118268)
@@ -0,0 +1,83 @@
+From e61d4afa02072b48a332c7250b293704f57c6b2a Mon Sep 17 00:00:00 2001
+From: "mluessi at nmr.mgh.harvard.edu" <mluessi at 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
+

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2014-09-04 10:32:59 UTC (rev 118267)
+++ community-x86_64/PKGBUILD	2014-09-04 10:33:12 UTC (rev 118268)
@@ -1,72 +0,0 @@
-# $Id$
-# Maintainer: Andrzej Giniewicz <gginiu at gmail.com>
-
-pkgname=mayavi
-pkgver=4.3.1
-pkgrel=2
-pkgdesc="A 3-dimensional visualizer of scientific data"
-arch=('i686' 'x86_64')
-url="https://github.com/enthought/mayavi"
-license=('BSD')
-depends=('ipython2' 'vtk' 'python2-envisage' 'wxpython2.8')
-makedepends=('python2-setuptools' 'python2-sphinx' 'python2-twisted' 'xorg-server-xvfb')
-replaces=('python2-mayavi')
-provides=('python2-mayavi')
-options=(!emptydirs)
-
-source=("$pkgname-$pkgver.tar.gz::https://github.com/enthought/mayavi/archive/${pkgver}.tar.gz")
-md5sums=('93677c77f0a835537bd210c493740b03')
-
-build() {
-  cd "$srcdir"/mayavi-$pkgver
-
-  # force selection of wxpython 2.8
-  sed -e "s/wxversion.ensureMinimal('2.8')/wxversion.select('2.8')/g" -i $(find . -name '*.py')
-
-  # Use python2-sphinx provided sphinx-build2
-  sed -i -e 's/sphinx-build/sphinx-build2/' docs/Makefile*
-
-  # Fix distutils compatibility
-  sed -i -e 's/distutils.Version/distutils.version/' mayavi/modules/text.py
-  sed -i -e 's/distutils.Version/distutils.version/' tvtk/tools/mlab.py
-
-  # set path so autodoc can find just built modules
-  echo "sys.path.append('$srcdir/enthought-mayavi-${_githubtag}/build/lib.linux-$CARCH-2.7/')" >> docs/source/mayavi/conf.py
-  mkdir -p build/lib.linux-$CARCH-2.7/{tvtk/plugins/scene,mayavi/preferences,mayavi/core}
-  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/tvtk/tvtk_classes.zip \
-    build/lib.linux-$CARCH-2.7/tvtk/tvtk_classes.zip
-  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/mayavi/preferences/preferences.ini \
-    build/lib.linux-$CARCH-2.7/mayavi/preferences/preferences.ini
-  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/tvtk/plugins/scene/preferences.ini \
-    build/lib.linux-$CARCH-2.7/tvtk/plugins/scene/preferences.ini
-
-  # now this is ugly, but docs do not build without X. We setup X according to:
-  # http://docs.enthought.com/mayavi/mayavi/tips.html#rendering-using-the-virtual-framebuffer
-  export DISPLAY=:69
-  Xvfb $DISPLAY &
-
-  # build!
-  python2 setup.py build
-
-  # have to kill the server to proceed, and do other cleanup
-  kill `cat /tmp/.X${DISPLAY/:/}-lock`
-  rm build/lib.linux-$CARCH-2.7/tvtk/tvtk_classes.zip
-  rm build/lib.linux-$CARCH-2.7/mayavi/preferences/preferences.ini
-  rm build/lib.linux-$CARCH-2.7/tvtk/plugins/scene/preferences.ini
-}
-
-package() {
-  cd "$srcdir"/mayavi-$pkgver
-
-  python2 setup.py install --root="$pkgdir"/ --optimize=1
-
-  cp -r docs/build/* "${pkgdir}"/usr/lib/python2.7/site-packages
-
-  sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-    $(find "${pkgdir}" -name '*.py')
-  sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-    "$pkgdir/usr/lib/python2.7/site-packages/mayavi/tests/csv_files/csv_2_py"
-
-  install -D LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-

Copied: mayavi/repos/community-x86_64/PKGBUILD (from rev 118267, mayavi/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2014-09-04 10:33:12 UTC (rev 118268)
@@ -0,0 +1,90 @@
+# $Id$
+# Maintainer: Andrzej Giniewicz <gginiu at gmail.com>
+
+pkgname=mayavi
+pkgver=4.3.1
+pkgrel=3
+pkgdesc="A 3-dimensional visualizer of scientific data"
+arch=('i686' 'x86_64')
+url="https://github.com/enthought/mayavi"
+license=('BSD')
+depends=('ipython2' 'vtk' 'python2-envisage' 'python2-pyqt4')
+makedepends=('python2-setuptools' 'python2-sphinx' 'python2-twisted' 'xorg-server-xvfb')
+replaces=('python2-mayavi')
+provides=('python2-mayavi')
+options=(!emptydirs)
+
+source=("$pkgname-$pkgver.tar.gz::https://github.com/enthought/mayavi/archive/${pkgver}.tar.gz"
+        "mayavi.sh" "mayavi.csh")
+md5sums=('93677c77f0a835537bd210c493740b03'
+         '6d36bbfb69010e313292cfee4982487f'
+         '91eb92abc506a00c29afcb37c9600914')
+
+prepare() {
+  cd "$srcdir"/mayavi-$pkgver
+
+  # force selection of wxpython 2.8
+  sed -e "s/wxversion.ensureMinimal('2.8')/wxversion.select('2.8')/g" -i $(find . -name '*.py')
+
+  # Use python2-sphinx provided sphinx-build2
+  sed -i -e 's/sphinx-build/sphinx-build2/' docs/Makefile*
+
+  # Fix distutils compatibility
+  sed -i -e 's/distutils.Version/distutils.version/' mayavi/modules/text.py
+  sed -i -e 's/distutils.Version/distutils.version/' tvtk/tools/mlab.py
+
+  # set path so autodoc can find just built modules
+  echo "sys.path.append('$srcdir/enthought-mayavi-${_githubtag}/build/lib.linux-$CARCH-2.7/')" >> docs/source/mayavi/conf.py
+
+  # fix python->python2
+  sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+      -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+      -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
+      -i $(find . -name '*[\._]py')
+}
+
+build() {
+  cd "$srcdir"/mayavi-$pkgver
+  rm -rf build
+  mkdir build
+  mkdir -p build/lib.linux-$CARCH-2.7/{tvtk/plugins/scene,mayavi/preferences,mayavi/core}
+  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/tvtk/tvtk_classes.zip \
+    build/lib.linux-$CARCH-2.7/tvtk/tvtk_classes.zip
+  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/mayavi/preferences/preferences.ini \
+    build/lib.linux-$CARCH-2.7/mayavi/preferences/preferences.ini
+  ln -s "$srcdir"/enthought-mayavi-${_githubtag}/tvtk/plugins/scene/preferences.ini \
+    build/lib.linux-$CARCH-2.7/tvtk/plugins/scene/preferences.ini
+
+  # force using Qt during build
+  export ETS_TOOLKIT=qt4
+
+  # now this is ugly, but docs do not build without X. We setup X according to:
+  # http://docs.enthought.com/mayavi/mayavi/tips.html#rendering-using-the-virtual-framebuffer
+  export DISPLAY=:69
+  Xvfb $DISPLAY &
+
+  # build!
+  python2 setup.py build
+
+  # have to kill the server to proceed, and do other cleanup
+  kill `cat /tmp/.X${DISPLAY/:/}-lock`
+  rm build/lib.linux-$CARCH-2.7/tvtk/tvtk_classes.zip
+  rm build/lib.linux-$CARCH-2.7/mayavi/preferences/preferences.ini
+  rm build/lib.linux-$CARCH-2.7/tvtk/plugins/scene/preferences.ini
+}
+
+package() {
+  cd "$srcdir"/mayavi-$pkgver
+
+  python2 setup.py install --root="$pkgdir"/ --optimize=1
+
+  cp -r docs/build/* "${pkgdir}"/usr/lib/python2.7/site-packages
+
+  # switch to PyQt by default, fix FS#41791
+  install -d "${pkgdir}"/etc/profile.d
+  install -Dm644 "${srcdir}"/mayavi.sh "${pkgdir}"/etc/profile.d/mayavi.sh
+  install -Dm644 "${srcdir}"/mayavi.csh "${pkgdir}"/etc/profile.d/mayavi.csh
+
+  install -D LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+

Copied: mayavi/repos/community-x86_64/mayavi.csh (from rev 118267, mayavi/trunk/mayavi.csh)
===================================================================
--- community-x86_64/mayavi.csh	                        (rev 0)
+++ community-x86_64/mayavi.csh	2014-09-04 10:33:12 UTC (rev 118268)
@@ -0,0 +1 @@
+setenv ETS_TOOLKIT "qt4"

Copied: mayavi/repos/community-x86_64/mayavi.sh (from rev 118267, mayavi/trunk/mayavi.sh)
===================================================================
--- community-x86_64/mayavi.sh	                        (rev 0)
+++ community-x86_64/mayavi.sh	2014-09-04 10:33:12 UTC (rev 118268)
@@ -0,0 +1 @@
+export ETS_TOOLKIT="qt4"

Deleted: community-x86_64/vtk-5.10.patch
===================================================================
--- community-x86_64/vtk-5.10.patch	2014-09-04 10:32:59 UTC (rev 118267)
+++ community-x86_64/vtk-5.10.patch	2014-09-04 10:33:12 UTC (rev 118268)
@@ -1,83 +0,0 @@
-From e61d4afa02072b48a332c7250b293704f57c6b2a Mon Sep 17 00:00:00 2001
-From: "mluessi at nmr.mgh.harvard.edu" <mluessi at 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
-

Copied: mayavi/repos/community-x86_64/vtk-5.10.patch (from rev 118267, mayavi/trunk/vtk-5.10.patch)
===================================================================
--- community-x86_64/vtk-5.10.patch	                        (rev 0)
+++ community-x86_64/vtk-5.10.patch	2014-09-04 10:33:12 UTC (rev 118268)
@@ -0,0 +1,83 @@
+From e61d4afa02072b48a332c7250b293704f57c6b2a Mon Sep 17 00:00:00 2001
+From: "mluessi at nmr.mgh.harvard.edu" <mluessi at 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
+




More information about the arch-commits mailing list