File python-evtk.spec of Package python-evtk
#
# spec file for package python-evtk
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define modname evtk
%define tarname py%{modname}
Name: python-%{modname}
Version: 0.2.0
Release: 0
Summary: A self-contained Python module to write binary VTK files
License: GPL-2.0
Group: Development/Libraries/Python
Url: https://bitbucket.org/pauloh/pyevtk
Source0: %{tarname}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-numpy-devel
BuildRequires: xz
Provides: python-pyevtk = %{version}
Obsoletes: python-pyevtk < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%else
%{py_requires}
%endif
%description
EVTK (Export VTK) package allows exporting data to binary VTK files for
visualization and data analysis with any of the visualization packages that
support VTK files, e.g. Paraview, VisIt and Mayavi.
%prep
%setup -q -n %{tarname}
%build
CFLAGS="%{optflags}" python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
chmod -x README.txt
chmod +x %{buildroot}%{python_sitearch}/%{modname}/examples/{points,image,structured,group,lowlevel,rectilinear}.py
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README.txt
%{python_sitearch}/%{modname}/
%{python_sitearch}/%{modname}-%{version}-py%{py_ver}.egg-info
%changelog