Hello community, here is the log from the commit of package python-slycot for openSUSE:Factory checked in at 2019-12-05 17:34:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-slycot (Old) and /work/SRC/openSUSE:Factory/.python-slycot.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-slycot" Thu Dec 5 17:34:02 2019 rev:6 rq:753976 version:0.3.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-slycot/python-slycot.changes 2019-11-09 23:39:47.457241774 +0100 +++ /work/SRC/openSUSE:Factory/.python-slycot.new.4691/python-slycot.changes 2019-12-05 17:34:30.361446760 +0100 @@ -1,0 +2,13 @@ +Wed Dec 4 11:15:25 UTC 2019 - Benjamin Greiner <[email protected]> + +- mirror blas/lapack/openblas requirements from numpy-devel depending + on architecture and force CMake to find it. +- reduce the required precision in the sg03ad test so that + powerpc passes + +------------------------------------------------------------------- +Tue Dec 3 14:18:40 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Update fix-test-sg03ad.patch once more again + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-slycot.spec ++++++ --- /var/tmp/diff_new_pack.GwPshy/_old 2019-12-05 17:34:31.069446659 +0100 +++ /var/tmp/diff_new_pack.GwPshy/_new 2019-12-05 17:34:31.073446659 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-slycot # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,16 @@ # +%if 0%{?sle_version} == 120300 && !0%{?is_opensuse} + %bcond_with openblas +%else + %ifarch armv6l s390 s390x m68k riscv64 + %bcond_with openblas + %else + %bcond_without openblas + %endif +%endif + %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-slycot Version: 0.3.5.0 @@ -33,16 +43,18 @@ BuildRequires: %{python_module numpy-devel} BuildRequires: %{python_module scikit-build} BuildRequires: %{python_module setuptools} -BuildRequires: blas-devel BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc BuildRequires: gcc-fortran -BuildRequires: lapack-devel BuildRequires: python-rpm-macros BuildRequires: python2-configparser -Requires: blas -Requires: lapack +%if %{with openblas} +BuildRequires: openblas-devel +%else +BuildRequires: blas-devel +BuildRequires: lapack-devel +%endif Requires: python-numpy %python_subpackages @@ -53,6 +65,10 @@ %setup -q -n slycot-%{version} %patch0 -p1 %patch1 -p1 +%if %{with openblas} +sed -i 's/#set(BLA_VENDOR "OpenBLAS")/set(BLA_VENDOR "OpenBLAS")/' CMakeLists.txt +%endif +sed -i 's/LAPACK REQUIRED/LAPACK REQUIRED MODULE/' CMakeLists.txt %build export CFLAGS="%{optflags}" ++++++ fix-test-sg03ad.patch ++++++ --- /var/tmp/diff_new_pack.GwPshy/_old 2019-12-05 17:34:31.089446657 +0100 +++ /var/tmp/diff_new_pack.GwPshy/_new 2019-12-05 17:34:31.089446657 +0100 @@ -1,8 +1,8 @@ diff --git a/slycot/tests/test_sg03ad.py b/slycot/tests/test_sg03ad.py -index 7b498d6..bc4b043 100644 +index 7b498d6..35d23e6 100644 --- a/slycot/tests/test_sg03ad.py +++ b/slycot/tests/test_sg03ad.py -@@ -8,52 +8,50 @@ import unittest +@@ -8,52 +8,73 @@ import unittest from slycot import synthesis import numpy as np @@ -15,7 +15,8 @@ + class test_sg03ad(unittest.TestCase): - def test_sg03ad_a(self): +- def test_sg03ad_a(self): ++ def test_sg03ad_1c(self): # Example 1 n = 100 - Xref = np.ones((n,n)) @@ -24,8 +25,8 @@ for t in range(0, 50, 10): - A = 2.0**(-t) - np.eye(n) + np.diag(range(1,n+1)) + U.T - E = np.eye(n) + 2**(-t)*U -+ A = 2.0**(-t) - np.eye(n) + np.diag(np.arange(1, n+1)) + U.T -+ E = np.eye(n) + 2.0**(-t)*U ++ A = (2**(-t) - 1) * np.eye(n) + np.diag(np.arange(1., n+1.)) + U.T ++ E = np.eye(n) + 2**(-t) * U Y = A.T.dot(Xref).dot(E) + E.T.dot(Xref).dot(A) - Q = np.zeros((n,n)) - Z = np.zeros((n,n)) @@ -33,8 +34,32 @@ + Z = np.zeros((n, n)) A, E, Q, Z, X, scale, sep, ferr, alphar, alphai, beta = \ synthesis.sg03ad('C', 'B', 'N', 'N', 'L', n, A, E, Q, Z, Y) - assert_almost_equal(Xref, X) +- assert_almost_equal(Xref, X) - ++ try: ++ assert_almost_equal(X, Xref, decimal=5) ++ except AssertionError as e: ++ print("Failed on t={}".format(t)) ++ raise e ++ ++ def test_sg03ad_1d(self): ++ # Example 1 ++ n = 100 ++ Xref = np.ones((n, n)) ++ U = np.tril(Xref) ++ for t in range(0, 50, 10): ++ A = 2**(-t) * np.eye(n) + np.diag(np.arange(1., n+1.)) + U.T ++ E = np.eye(n) + 2**(-t) * U ++ Y = A.T.dot(Xref).dot(A) - E.T.dot(Xref).dot(E) ++ Q = np.zeros((n, n)) ++ Z = np.zeros((n, n)) ++ A, E, Q, Z, X, scale, sep, ferr, alphar, alphai, beta = \ ++ synthesis.sg03ad('D', 'B', 'N', 'N', 'L', n, A, E, Q, Z, Y) ++ try: ++ assert_almost_equal(X, Xref, decimal=5) ++ except AssertionError as e: ++ print("Failed on t={}".format(t)) ++ raise e + def test_sg03ad_3(self): n = 3
