%global srcname viper Name: python-%{srcname} Version: 1.0.0 Release: 0.2%{?dist} Summary: A minimalistic scientific plotter and run-time visualization module Group: Applications/Engineering License: LGPLv2+ URL: http://www.fenicsproject.org Source0: http://launchpad.net/fenics-%{srcname}/1.0.x/%{version}/+download/%{srcname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools Requires: numpy Requires: vtk-python %description A simple mesh plotter and run-time visualization module for plotting and saving simulation data. The class C{Viper} can visualize solutions given as numpy arrays, and meshes that provide the two methods C{cells()} and C{coordinates()}. These methods should return numpy arrays specifying the node-element ordering and coordinates of the nodes, respectively. %package demo Summary: Demo files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: dolfin %description demo The %{name}-demo package contains demo files for %{name}. %prep %setup -q -n %{srcname}-%{version} # Removing shebang sed -i -e '/^#!\//, 1d' src/viper/{viper,viper_dolfin}.py sed -i -e '/^#!\//, 1d' src/demo/test_meshgrid.py %build %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root %{buildroot} mkdir %{buildroot}%{python_sitelib}/%{srcname}/demo/ install -Dp -m 0644 src/demo/* %{buildroot}%{python_sitelib}/%{srcname}/demo/ %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING README doc/manual/*.pdf %{_mandir}/man*/*.1* %{_bindir}/%{srcname}/ %{python_sitelib}/%{srcname}/ %{python_sitelib}/%{srcname}*.egg-info %exclude %{python_sitelib}/%{srcname}/demo %files demo %defattr(-,root,root,-) %{python_sitelib}/%{srcname}/demo %changelog * Sun May 13 2012 Jonathan G. Underwood - 1.0.0-0.2 - Correct Requires for vtk-python (rather than python-vtk) * Wed May 2 2012 Jonathan G. Underwood - 1.0.0-0.1 - Initial EL6 local build based on Fabian Affolter's package currently under review at https://bugzilla.redhat.com/show_bug.cgi?id=693158