%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-Mayavi Version: 3.1.0 Release: 2%{?dist} Summary: The Mayavi scientific data 3-dimensional visualizer Group: Development/Languages License: BSD and EPL and LGPLv2+ URL: http://pypi.python.org/pypi/Mayavi/%{version} #md5=54b2681bbdbdc8e26346917cc29b6f17 Source0: http://pypi.python.org/packages/source/M/Mayavi/Mayavi-3.1.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-setuptools, python-devel, python-setupdocs, python-sphinx BuildRequires: numpy, vtk-python Requires: numpy, vtk-python Requires: python-AppTools Requires: python-EnthoughtBase Requires: python-EnvisageCore Requires: python-EnvisagePlugins Requires: python-Traits Requires: python-TraitsGUI Requires: python-TraitsBackendQt %description 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. These libraries 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 interface or program to its scripting interface; you probably don't need to interact with TVTK unless you want to create a new Mayavi module. %prep %setup -q -n Mayavi-%{version} sed -i 's/\.dev$//g' Mayavi.egg-info/requires.txt # wrong-file-end-of-line-encoding sed -i 's/\r//' examples/mayavi/wx_mayavi_embed_in_notebook.py sed -i 's/\r//' examples/mayavi/data/room_vis.wrl sed -i 's/\r//' examples/tvtk/dscene.py sed -i 's/\r//' image_LICENSE_Nuvola.txt image_LICENSE_OOo.txt sed -i 's/\r//' image_LICENSE_Eclipse.txt # file-not-utf8 iconv -f iso8859-1 -t utf-8 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 \ && 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 \ && mv -f README-mayavi.txt.conv README-mayavi.txt iconv -f iso8859-1 -t utf-8 docs/THANKS.txt > docs/THANKS.txt.conv \ && mv -f docs/THANKS.txt.conv docs/THANKS.txt %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # non-executable-script chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/enthought/mayavi/scripts/mayavi2.py chmod 755 $RPM_BUILD_ROOT/%{python_sitearch}/enthought/tvtk/setup.py %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc *.txt docs/*.txt examples/ docs/pdf/*.pdf docs/pdf/*/*.pdf %{_bindir}/mayavi2 %{_bindir}/tvtk_doc %{python_sitearch}/* %changelog * Tue Jan 27 2009 Rakesh Pandit 3.1.0-2 - Fixed description. * Tue Jan 27 2009 Rakesh Pandit 3.1.0-1 - Initial package