17
0

Accepting request 662933 from devel:languages:python:numeric

OBS-URL: https://build.opensuse.org/request/show/662933
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-PyWavelets?expand=0&rev=4
This commit is contained in:
2019-01-21 09:46:33 +00:00
committed by Git OBS Bridge
parent eb4b9cc6d4
commit 2fa5fbdd91
7 changed files with 93 additions and 100 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-PyWavelets
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,21 +12,21 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-PyWavelets
Version: 0.5.2
Version: 1.0.1
Release: 0
Summary: PyWavelets is a Python wavelet transforms module
License: MIT
Group: Development/Libraries/Python
URL: http://pypi.python.org/pypi/PyWavelets/
Source0: https://files.pythonhosted.org/packages/source/P/PyWavelets/PyWavelets-%{version}.tar.gz
# PATCH-FIX-UPSTREAM add_default_to_switch_statement.patch -- Fix no return in nonvoid function error
Patch0: add_default_to_switch_statement.patch
Source10: https://media.readthedocs.org/pdf/pywavelets/v%{version}/pywavelets.pdf
Source11: https://media.readthedocs.org/htmlzip/pywavelets/v%{version}/pywavelets.zip
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module nose}
@@ -34,10 +34,7 @@ BuildRequires: %{python_module numpy-devel >= 1.9.1}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Documentation requirements
BuildRequires: python3-Pygments
BuildRequires: python3-Sphinx
BuildRequires: python3-numpydoc
BuildRequires: unzip
Requires: python-numpy >= 1.9.1
%python_subpackages
@@ -52,9 +49,9 @@ PyWavelets is a Python wavelet transforms module that can do:
* Single and double precision calculations
* Results compatibility with Matlab Wavelet Toolbox
%package -n %{name}-doc
%package -n %{name}-doc
Summary: This package contains the HMTL documentation of %{name}
Group: Documentation/HTML
Group: Documentation/Other
Provides: %{python_module PyWavelets-doc = %{version}}
%description -n %{name}-doc
@@ -68,15 +65,19 @@ PyWavelets is a Python wavelet transforms module that can do:
* Single and double precision calculations
* Results compatibility with Matlab Wavelet Toolbox
This Package contains the documentation of %{name} in HTML format.
This Package contains the documentation of %{name} in HTML and PDF formats.
%prep
%setup -q -n PyWavelets-%{version}
%patch0 -p1
sed -i -e '/^#!\//, 1d' pywt/tests/*.py
cp %{SOURCE10} .
unzip %{SOURCE11} -d docs
mv docs/pywavelets-* docs/html
rm docs/html/.buildinfo
# Make docs non-executable
chmod a-x *.rst
chmod a-x *.txt
chmod a-x PyWavelets.egg-info/*
# Fix wrong-script-interpreter
@@ -107,23 +108,22 @@ $python -O -m compileall -d %{$python_sitearch} pywt/tests/
popd
}
# Create docs. These need the package to already be built and installed
PYTHONPATH="$PYTHONPATH:%{buildroot}%{python3_sitearch}" make -C doc PAPER=letter html
# Remove hiden files
find doc/build/html -name '.*' -exec rm {} \;
%check
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_exec setup.py test
mkdir test
pushd test
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python -B -c 'import pywt;pywt.test()'
}
%files %{python_files}
%doc CHANGES.txt README.rst THANKS.txt
%doc README.rst
%license LICENSE
%{python_sitearch}/pywt/
%{python_sitearch}/PyWavelets-%{version}-py*.egg-info
%files -n %{name}-doc
%doc doc/build/html
%doc demo/
%license LICENSE
%doc pywavelets.pdf
%doc docs/html
%changelog