[Mayavi: 4/4] Update to 3.3.2

supercyper supercyper at fedoraproject.org
Sun Aug 15 08:17:39 UTC 2010


commit 90ea7e8ebc7c9c5e1e94d09bac74d4c326f0962e
Author: Chen Lei <supercyper at 163.com>
Date:   Sun Aug 15 16:17:12 2010 +0800

    Update to 3.3.2

 .gitignore       |    2 +-
 Mayavi.desktop   |   10 ---
 Mayavi.spec      |  186 ++++++++++++++++++++++--------------------------------
 mayavi2.desktop  |    9 +++
 sources          |    2 +-
 tvtk_doc.desktop |   10 ---
 6 files changed, 86 insertions(+), 133 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 685fb72..9333ff8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-Mayavi-3.3.0.tar.gz
+Mayavi-3.3.2.tar.gz
diff --git a/Mayavi.spec b/Mayavi.spec
index 9eb4180..c46c0b4 100644
--- a/Mayavi.spec
+++ b/Mayavi.spec
@@ -1,43 +1,27 @@
-# sitelib for noarch packages, sitearch for others (remove the unneeded one)
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-
 Name:           Mayavi
-Version:        3.3.0
-Release:        2%{?dist}
+Version:        3.3.2
+Release:        1%{?dist}
 Summary:        Scientific data 3-dimensional visualizer
-
 Group:          Applications/Engineering
-License:        BSD and EPL and LGPLv2+ and LGPLv3+
-URL:            http://pypi.python.org/pypi/Mayavi/
+License:        BSD and EPL and LGPLv2+ and LGPLv2 and LGPLv3
+URL:            http://code.enthought.com/projects/mayavi/
 Source0:        http://www.enthought.com/repo/ETS/%{name}-%{version}.tar.gz
-Source1:        Mayavi.desktop
-Source2:        tvtk_doc.desktop
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:  python-setuptools, python-setupdocs, python-sphinx
-BuildRequires:  vtk-python, desktop-file-utils
-%if 0%{?fedora} >= 11
-BuildRequires:  numpy-f2py
-%else
-BuildRequires:  numpy
-%endif
-Requires:       numpy, vtk-python
-Requires:       wxPython
-Requires:       python-AppTools
-Requires:       python-EnthoughtBase
-Requires:       python-EnvisageCore
-Requires:       python-EnvisagePlugins
-Requires:       python-Traits >= 3.1.0
-Requires:       python-TraitsGUI
-Requires:       python-TraitsBackendQt >= 3.1.0
+Source1:        mayavi2.desktop
+BuildRequires:  python2-devel, python-setuptools, python-setupdocs
+BuildRequires:  numpy, vtk-python, desktop-file-utils 
+Requires:       vtk-python, python-AppTools
+# EnthoughtBase, Traits[ui] and numpy come with TraitsGUI
+# TraitsGUI comes with AppTools
+Requires:       python-EnvisageCore, python-EnvisagePlugins
 
 %description
-
-The Mayavi project includes two related packages for 3-dimensional
+The Mayavi project includes two related packages for 3-dimensional 
 visualization:
 
  * Mayavi2: A tool for easy and interactive visualization of data.
  * TVTK: A Traits-based wrapper for the Visualization Toolkit, a
-popular open-source visualization library.
+   popular open-source visualization library.
+
 These operate at different levels of abstraction. TVTK manipulates
 visualization objects, while Mayavi2 lets you operate on your data,
 and then see the results. Most users either use the Mayavi user
@@ -47,93 +31,63 @@ module.
 
 %prep
 %setup -q -n %{name}-%{version}
-rm -rf Mayavi.egg-info
-
-# removes .buildinfo files
-find enthought/mayavi/html/ enthought/tvtk/html/ -name \.buildinfo \
- -type f -print | xargs rm -f -
-
-# Fixed license naming
-sed 's/icon_/image_/g' image_LICENSE.txt > image_LICENSE.txt.fixed
-touch -c -r image_LICENSE.txt image_LICENSE.txt.fixed
-mv -f image_LICENSE.txt.fixed image_LICENSE.txt
 
-# wrong-file-end-of-line-encoding
-sed 's/\r//' examples/mayavi/data/room_vis.wrl > \
- examples/mayavi/data/room_vis.wrl.fixed
-touch -c -r examples/mayavi/data/room_vis.wrl \
- examples/mayavi/data/room_vis.wrl.fixed
-mv -f  examples/mayavi/data/room_vis.wrl.fixed \
- examples/mayavi/data/room_vis.wrl
+rm -rf *.egg-info
 
-sed 's/\r//' examples/tvtk/dscene.py > examples/tvtk/dscene.py.fixed
-touch -c -r examples/tvtk/dscene.py examples/tvtk/dscene.py.fixed
-mv -f examples/tvtk/dscene.py.fixed examples/tvtk/dscene.py
-
-sed 's/\r//' image_LICENSE_Nuvola.txt > image_LICENSE_Nuvola.txt.fixed
-touch -c -r image_LICENSE_Nuvola.txt image_LICENSE_Nuvola.txt.fixed
-mv -f image_LICENSE_Nuvola.txt.fixed image_LICENSE_Nuvola.txt
-
-sed 's/\r//' image_LICENSE_OOo.txt > image_LICENSE_OOo.txt.fixed
-touch -c -r image_LICENSE_OOo.txt image_LICENSE_OOo.txt.fixed
-mv -f image_LICENSE_OOo.txt.fixed image_LICENSE_OOo.txt
-
-sed 's/\r//' image_LICENSE_Eclipse.txt > image_LICENSE_Eclipse.txt.fixed
-touch -c -r image_LICENSE_Eclipse.txt image_LICENSE_Eclipse.txt.fixed
-mv -f image_LICENSE_Eclipse.txt.fixed image_LICENSE_Eclipse.txt
+# fix wrong-file-end-of-line-encoding
+for file in *.txt examples/mayavi/data/room_vis.wrl examples/tvtk/dscene.py \
+ examples/mayavi/interactive/wx_mayavi_embed*.py ; do
+ sed "s|\r||g" $file > $file.new && \
+ touch -r $file $file.new && \
+ mv $file.new $file
+done
 
 # file-not-utf8
-iconv -f iso8859-1 -t utf-8 image_LICENSE_OOo.txt > image_LICENSE_OOo.txt.conv \
- && touch -c -r image_LICENSE_OOo.txt image_LICENSE_OOo.txt.conv \
- && mv -f image_LICENSE_OOo.txt.conv image_LICENSE_OOo.txt
-iconv -f iso8859-1 -t utf-8 image_LICENSE_Eclipse.txt > image_LICENSE_Eclipse.txt.conv \
- && touch -c -r image_LICENSE_Eclipse.txt image_LICENSE_Eclipse.txt.conv \
- && mv -f image_LICENSE_Eclipse.txt.conv image_LICENSE_Eclipse.txt
-iconv -f iso8859-1 -t utf-8 README-mayavi.txt > README-mayavi.txt.conv \
- && touch -c -r README-mayavi.txt README-mayavi.txt.conv \
- && mv -f README-mayavi.txt.conv README-mayavi.txt
-iconv -f iso8859-1 -t utf-8 docs/THANKS.txt > docs/THANKS.txt.conv \
- && touch -c -r docs/THANKS.txt docs/THANKS.txt.conv \
- && mv -f docs/THANKS.txt.conv docs/THANKS.txt
-
-# spurious-executable-perm
-chmod -x examples/mayavi/nongui.py \
- examples/tvtk/plugins/test.py \
- enthought/mayavi/tests/data/cellsnd.ascii.inp
+for file in *.txt docs/*.txt; do
+ iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
+ touch -r $file $file.new && \
+ mv $file.new $file
+done
+
+# remove shebang
+for file in enthought/mayavi/scripts/*.py; do
+ sed '/^#!\//, 1d' $file > $file.new && \
+ touch -r $file $file.new && \
+ mv $file.new $file
+done
+
+# remove exec permission
+find examples -type f -exec chmod 0644 {} ";"
+chmod 0644 enthought/mayavi/tests/data/cellsnd.ascii.inp
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" python setup.py release build
-
+CFLAGS="$RPM_OPT_FLAGS" python setup.py build
 
 %install
-rm -rf $RPM_BUILD_ROOT
-python setup.py install -v -O1 --skip-build --root $RPM_BUILD_ROOT
-sed -i 's/\.dev$//g' $RPM_BUILD_ROOT/%{python_sitearch}/%{name}-%{version}-*.egg-info/requires.txt
+python setup.py install --skip-build --root $RPM_BUILD_ROOT
+
+# remove useless files
+rm -f $RPM_BUILD_ROOT%{python_sitearch}/enthought/tvtk/setup.py*
+find $RPM_BUILD_ROOT%{python_sitearch}/enthought -name \.buildinfo \
+ -type f -print | xargs rm -f -
+
+# fix wrong-file-end-of-line-encoding
+for file in $RPM_BUILD_ROOT%{python_sitearch}/enthought/mayavi/html/_downloads/wx_mayavi*.py; do
+ sed "s|\r||g" $file > $file.new && \
+ touch -r $file $file.new && \
+ mv $file.new $file
+done
 
 # non-executable-script
-chmod +x $RPM_BUILD_ROOT/%{python_sitearch}/enthought/mayavi/tests/runtests.py \
- $RPM_BUILD_ROOT/%{python_sitearch}/enthought/mayavi/scripts/mayavi2.py \
- $RPM_BUILD_ROOT/%{python_sitearch}/enthought/tvtk/setup.py
+chmod +x $RPM_BUILD_ROOT%{python_sitearch}/enthought/mayavi/tests/runtests.py
+
+mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
+cp -p docs/mayavi2.man $RPM_BUILD_ROOT/%{_mandir}/man1/mayavi2.1
 
-rm $RPM_BUILD_ROOT/%{python_sitearch}/*-nspkg.pth
-mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
-mv docs/mayavi2.man $RPM_BUILD_ROOT/%{_mandir}/man1/%{name}.1
 desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE1}
-desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2}
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/
 install -p -m 644 ./docs/source/mayavi/images/mayavi2-48x48.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/mayavi2.png
-install -p -m 644 ./docs/source/mayavi/images/mayavi2-48x48.png \
- $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/tvtk_doc.png 
-
-# removes .buildinfo files
-find docs/source/ \( -name \.static -o -name \.templates \) \
- -type d -print | xargs rm -rf -
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 
 %post
 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
@@ -147,23 +101,33 @@ fi
 %posttrans
 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
-
 %files
 %defattr(-,root,root,-)
 %doc *.txt docs/*.txt examples/
-%doc docs/source
+#doc build/docs/html
+%dir %{python_sitearch}/enthought/mayavi
+%dir %{python_sitearch}/enthought/tvtk
+%doc %{python_sitearch}/enthought/mayavi/html
+%doc %{python_sitearch}/enthought/tvtk/html
+%{python_sitearch}/enthought/mayavi/[_a-gi-z]*
+%{python_sitearch}/enthought/tvtk/[_a-gi-z]*
+%{python_sitearch}/*.egg-info
+%{python_sitearch}/*.pth
 %{_bindir}/mayavi2
 %{_bindir}/tvtk_doc
-%{python_sitearch}/enthought/*
-%{python_sitearch}/*.egg-info
-%{_mandir}/man1/%{name}.1.gz
-%{_datadir}/applications/%{name}.desktop
-%{_datadir}/applications/tvtk_doc.desktop
-%{_datadir}/icons/hicolor/48x48/apps/tvtk_doc.png
+%{_mandir}/man1/mayavi2.1.*
+%{_datadir}/applications/mayavi2.desktop
 %{_datadir}/icons/hicolor/48x48/apps/mayavi2.png
 
-
 %changelog
+* Fri Aug 13 2010 Chen Lei <supercyper at 163.com> 3.3.2-1
+- Update spec to match latest guidelines w.r.t %%clean
+- Remove explict dependency on python-TraitsBackendQt.spec
+- Rename man page(Mayavi -> mayavi2)
+- Remove docs src
+- Remove tvtk_doc.desktop to avoid confusion
+- Fix timestampes for example files
+
 * Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 3.3.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
 
diff --git a/mayavi2.desktop b/mayavi2.desktop
new file mode 100644
index 0000000..8b69507
--- /dev/null
+++ b/mayavi2.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Mayavi2
+Comment=Tool for easy and interactive visualization of data
+GenericName=Scientific data 3-dimensional visualizer
+Exec=mayavi2 %U
+Terminal=false
+Type=Application
+Icon=mayavi2
+Categories=Education;Science;DataVisualization
diff --git a/sources b/sources
index b5736d0..785e255 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-efb0ff702142e119cfbd8c2c6d743cfa  Mayavi-3.3.0.tar.gz
+1cc31b3805631bbafd4adee95ec93a68  Mayavi-3.3.2.tar.gz


More information about the scm-commits mailing list