From e9020ce05c5aa6a94aada502fdbf8c4bbdbc92c0a279920003e2bd97ad0ef033 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 9 Mar 2023 18:04:03 +0000 Subject: [PATCH] Accepting request 1070501 from home:Guillaume_G:branches:devel:languages:python:numeric - Add upstream patch to fix test on aarch64: * 2582.patch OBS-URL: https://build.opensuse.org/request/show/1070501 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-ase?expand=0&rev=3 --- 2582.patch | 26 ++++++++++++++++++++++++++ python-ase.changes | 6 ++++++ python-ase.spec | 10 ++++++---- 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 2582.patch diff --git a/2582.patch b/2582.patch new file mode 100644 index 0000000..26f8aaf --- /dev/null +++ b/2582.patch @@ -0,0 +1,26 @@ +From 5e733253d9e791ed1568076ede93a983f27979f6 Mon Sep 17 00:00:00 2001 +From: "Adam J. Jackson" +Date: Tue, 30 Nov 2021 09:51:47 +0000 +Subject: [PATCH] TST: Vibration slab test should check for movement in ANY + direction + +It is possible for a perfectly good eigenvector to be zero in some +Cartesian direction; this was encountered in #976 and appears to be +architecture-dependent. +--- + ase/test/vibrations/test_vib.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ase/test/vibrations/test_vib.py b/ase/test/vibrations/test_vib.py +index fe28ff13e5..7786a47aec 100644 +--- a/ase/test/vibrations/test_vib.py ++++ b/ase/test/vibrations/test_vib.py +@@ -524,4 +524,4 @@ class TestSlab: + assert_array_almost_equal(vibs.get_mode(i)[0], [0., 0., 0.]) + + # The N atoms should have finite displacement +- assert np.all(vibs.get_mode(i)[-2:, :]) ++ assert np.all(np.any(vibs.get_mode(i)[-2:, :], axis=1)) +-- +GitLab + diff --git a/python-ase.changes b/python-ase.changes index 4aea10f..91ad996 100644 --- a/python-ase.changes +++ b/python-ase.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 9 15:58:40 UTC 2023 - Guillaume GARDET + +- Add upstream patch to fix test on aarch64: + * 2582.patch + ------------------------------------------------------------------- Wed Feb 8 06:56:05 UTC 2023 - Steve Kowalik diff --git a/python-ase.spec b/python-ase.spec index 08ad3b4..a0e9d5c 100644 --- a/python-ase.spec +++ b/python-ase.spec @@ -20,20 +20,22 @@ Name: python-ase Version: 3.22.1 Release: 0 Summary: Atomic Simulation Environment -License: LGPL-2.1+ +License: LGPL-2.1-or-later URL: https://wiki.fysik.dtu.dk/ase Source: https://files.pythonhosted.org/packages/source/a/ase/ase-%{version}.tar.gz # PATCH-FIX-UPSTREAM https://gitlab.com/ase/ase/-/merge_requests/2826 Patch0: support-matplotlib-36.patch -BuildRequires: python-rpm-macros +# PATCH-FIX-UPSTREAM https://gitlab.com/ase/ase/-/merge_requests/2582 +Patch1: 2582.patch BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module matplotlib >= 3.1.0} BuildRequires: %{python_module numpy >= 1.15.0} -BuildRequires: %{python_module scipy >= 1.1.0} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module scipy >= 1.1.0} BuildRequires: %{python_module tk} # /SECTION BuildRequires: fdupes