File python-weave.spec of Package python-weave

#
# spec file for package python-weave
#
# Copyright (c) 2017 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/
#


Name:           python-weave
Version:        0.16.0
Release:        0
Summary:        Weave: a C++ compiler for Python
License:        BSD-3-Clause
Group:          Development/Libraries/Python
Url:            http://www.github.com/scipy/weave
Source:         https://files.pythonhosted.org/packages/source/w/weave/weave-%{version}.tar.gz
BuildRequires:  python-devel
BuildRequires:  python-numpy-devel
BuildRequires:  python-scipy
Requires:       python-numpy
Requires:       python-scipy
Provides:       python-scipy-weave = %{version}
Obsoletes:      python-scipy-weave < %{version}
Provides:       python-weave-devel = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Weave provides tools for including C/C++ code within Python code. Inlining
C/C++ code within Python generally results in speedups of 1.5x to 30x over
algorithms written in pure Python.

Weave is the stand-alone version of the deprecated Scipy submodule
``scipy.weave``.   It is Python 2.x only, and is provided for users that need
new versions of Scipy (from which the ``weave`` submodule may be removed) but
have existing code that still depends on ``scipy.weave``.  For new code, users
are recommended to use Cython.

%prep
%setup -q -n weave-%{version}

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# Don't ship tests
find %{buildroot}%{python_sitelib}/weave -type d -name tests | xargs rm -rf
# Don't ship weave examples, they're marked as documentation:
find %{buildroot}%{python_sitelib}/weave -type d -name examples | xargs rm -rf

%files
%defattr(-,root,root,-)
%doc LICENSE.txt
%doc doc/tutorial*
%{python_sitelib}/weave-%{version}-py*.egg-info
%{python_sitelib}/weave
%exclude %{python_sitelib}/weave/LICENSE.txt

%changelog
openSUSE Build Service is sponsored by