Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-python-sofa for openSUSE:Factory checked in at 2021-03-11 20:10:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-python-sofa (Old) and /work/SRC/openSUSE:Factory/.python-python-sofa.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-sofa" Thu Mar 11 20:10:46 2021 rev:4 rq:878138 version:0.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-python-sofa/python-python-sofa.changes 2020-07-16 12:16:43.210859613 +0200 +++ /work/SRC/openSUSE:Factory/.python-python-sofa.new.2401/python-python-sofa.changes 2021-03-11 20:12:41.288702148 +0100 @@ -1,0 +2,9 @@ +Mon Mar 8 16:30:44 UTC 2021 - Ben Greiner <[email protected]> + +- 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) + +------------------------------------------------------------------- Old: ---- python-sofa-0.2.0.tar.gz New: ---- python-sofa-0.2.0-gh.tar.gz python-sofa-pr4-scipy1_6.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-python-sofa.spec ++++++ --- /var/tmp/diff_new_pack.zNwXA6/_old 2021-03-11 20:12:43.288705393 +0100 +++ /var/tmp/diff_new_pack.zNwXA6/_new 2021-03-11 20:12:43.292705400 +0100 @@ -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 @@ 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 @@ %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 ++++++ python-sofa-pr4-scipy1_6.patch ++++++ >From 5b1cd60f886ec227bcdc34a2ffa560eb0ccbbb33 Mon Sep 17 00:00:00 2001 From: Ben Greiner <[email protected]> Date: Mon, 8 Mar 2021 17:52:21 +0100 Subject: [PATCH] scipy.spatial.transform.Rotation.from_dcm has been renamed to .from_matrix --- src/sofa/spatial/coordinates.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/sofa/spatial/coordinates.py b/src/sofa/spatial/coordinates.py index 7d08ab0..c41d2d3 100644 --- a/src/sofa/spatial/coordinates.py +++ b/src/sofa/spatial/coordinates.py @@ -22,7 +22,15 @@ import numpy as np # for coordinate transformations -from scipy.spatial.transform import Rotation ## requires scipy 1.2.0 +from scipy.spatial.transform import Rotation + + +try: + # SciPy >=1.4 + R_from_matrix = Rotation.from_matrix +except AttributeError: + # SciPy >=1.2, < 1.6 + R_from_matrix = Rotation.from_dcm def sph2cart(alpha, beta, r): @@ -107,7 +115,7 @@ def _rotation_from_view_up(view, up): view = np.repeat(view, ulen, axis=0) up = np.repeat(up, vlen, axis=0) y_axis = np.cross(up, view) - return Rotation.from_dcm(np.moveaxis(np.asarray([view, y_axis, up]), 0, -1)) + return R_from_matrix(np.moveaxis(np.asarray([view, y_axis, up]), 0, -1)) def _get_object_transform(ref_object):
