Accepting request 623642 from devel:languages:python
- Stricten numpy dependency OBS-URL: https://build.opensuse.org/request/show/623642 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-PyWavelets?expand=0&rev=3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-PyWavelets
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 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
|
||||
@@ -16,8 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without tests
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-PyWavelets
|
||||
Version: 0.5.2
|
||||
@@ -25,13 +23,14 @@ Release: 0
|
||||
Summary: PyWavelets is a Python wavelet transforms module
|
||||
License: MIT
|
||||
Group: Development/Libraries/Python
|
||||
Url: http://pypi.python.org/pypi/PyWavelets/
|
||||
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
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.6.2}
|
||||
BuildRequires: %{python_module nose}
|
||||
BuildRequires: %{python_module numpy-devel >= 1.9.1}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -39,11 +38,7 @@ BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Pygments
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-numpydoc
|
||||
%if %{with tests}
|
||||
BuildRequires: %{python_module nose}
|
||||
%endif
|
||||
Requires: python-numpy >= 1.6.2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires: python-numpy >= 1.9.1
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -85,10 +80,10 @@ chmod a-x *.txt
|
||||
chmod a-x PyWavelets.egg-info/*
|
||||
|
||||
# Fix wrong-script-interpreter
|
||||
find demo -name '*.py' -exec sed -i "s|#!/usr/bin/env python|#!%__python3|" {} \;
|
||||
find demo -name '*.py' -exec sed -i "s|#!%{_bindir}/env python|#!%__python3|" {} \;
|
||||
|
||||
# Remove unneeded shebangs
|
||||
sed -i '1{\@^#!/usr/bin/env python@d}' pywt/data/create_dat.py
|
||||
sed -i '1{\@^#!%{_bindir}/env python@d}' pywt/data/create_dat.py
|
||||
|
||||
# Remove unneeded executable bits
|
||||
for lib in test_concurrent test_data test_deprecations test_doc test_matlab_compatibility test_matlab_compatibility_cwt test_thresholding data/generate_matlab_data data/generate_matlab_data_cwt ; do
|
||||
@@ -104,7 +99,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
|
||||
%{python_expand pushd %{buildroot}%{$python_sitearch}
|
||||
# Fix wrong-script-interpreter
|
||||
sed -i "s|#!/usr/bin/env python|#!%__$python|" pywt/tests/*.py
|
||||
sed -i "s|#!%{_bindir}/env python|#!%__$python|" pywt/tests/*.py
|
||||
# Deduplicating files can generate a RPMLINT warning for pyc mtime
|
||||
$python -m compileall -d %{$python_sitearch} pywt/tests/
|
||||
$python -O -m compileall -d %{$python_sitearch} pywt/tests/
|
||||
@@ -118,20 +113,16 @@ PYTHONPATH="$PYTHONPATH:%{buildroot}%{python3_sitearch}" make -C doc PAPER=lette
|
||||
# Remove hiden files
|
||||
find doc/build/html -name '.*' -exec rm {} \;
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%python_exec setup.py test
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root)
|
||||
%doc CHANGES.txt README.rst THANKS.txt
|
||||
%{python_sitearch}/pywt/
|
||||
%{python_sitearch}/PyWavelets-%{version}-py*.egg-info
|
||||
|
||||
%files -n %{name}-doc
|
||||
%defattr(-,root,root)
|
||||
%doc doc/build/html
|
||||
%doc demo/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user