1
0

Accepting request 877789 from home:bnavigator:branches:devel:languages:python:numeric

- Add python-sofa-pr4-scipy1_6.patch gh#spatialaudio/python-sofa#4
- Switch to Github Source Archive for the example notebook to test
  with pytest --nbval
- Skip python36 build: With NumPy 1.20, python36-numpy is no
  longer available in Tumbleweed (NEP 29)

OBS-URL: https://build.opensuse.org/request/show/877789
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-python-sofa?expand=0&rev=7
This commit is contained in:
2021-03-10 09:55:01 +00:00
committed by Git OBS Bridge
parent 46c8e69747
commit b79bc5f13d
5 changed files with 70 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-python-sofa
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,20 +17,27 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python36 1
Name: python-python-sofa
Version: 0.2.0
Release: 0
Summary: Spatially Oriented Format for Acoustics (SOFA) API for Python
License: MIT
Group: Development/Languages/Python
URL: https://github.com/spatialaudio/python-sofa/
Source: https://files.pythonhosted.org/packages/source/p/python-sofa/python-sofa-%{version}.tar.gz
URL: https://github.com/spatialaudio/python-sofa
# get examples for rudimentary testing from GitHub archive
Source: %{url}/archive/v%{version}.tar.gz#/python-sofa-%{version}-gh.tar.gz
# PATCH-FIX-UPSTREAM python-sofa-pr4-scipy1_6.patch gh#spatialaudio/python-sofa#4
Patch0: https://github.com/spatialaudio/python-sofa/pull/4.patch#/python-sofa-pr4-scipy1_6.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module matplotlib}
BuildRequires: %{python_module nbval}
BuildRequires: %{python_module netCDF4}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scipy >= 1.2.0}
# /SECTION
BuildRequires: fdupes
@@ -46,7 +53,7 @@ A Python API for reading, writing and creating SOFA files as defined
by the SOFA conventions (version 1.0).
%prep
%setup -q -n python-sofa-%{version}
%autosetup -p1 -n python-sofa-%{version}
%build
%python_build
@@ -55,6 +62,13 @@ by the SOFA conventions (version 1.0).
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
echo '[regex1]
regex: DateCreated: .*
replace: DateCreated: 0000-00-00 00:00:00
' > nodate.cfg
%pytest --nbval --sanitize-with nodate.cfg doc/examples/SOFA-file-access.ipynb
%files %{python_files}
%doc README.rst
%license LICENSE