diff --git a/python-sherpa.changes b/python-sherpa.changes index c742ce0..dadf87f 100644 --- a/python-sherpa.changes +++ b/python-sherpa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 14 13:39:10 UTC 2020 - Guillaume GARDET + +- Fix aarch64 build and test: + * sherpa-fix-aarch64.patch + ------------------------------------------------------------------- Mon Sep 14 09:33:07 UTC 2020 - Atri Bhattacharya diff --git a/python-sherpa.spec b/python-sherpa.spec index b5b6267..9350f3a 100644 --- a/python-sherpa.spec +++ b/python-sherpa.spec @@ -26,6 +26,8 @@ License: GPL-3.0-only URL: https://github.com/sherpa/sherpa/ Source: https://github.com/sherpa/sherpa/archive/%{version}.tar.gz#/sherpa-%{version}.tar.gz Patch1: reproducible.patch +# PATCH-FIX-UPSTREAM - https://github.com/sherpa/sherpa/issues/970 +Patch2: sherpa-fix-aarch64.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy-devel} BuildRequires: %{python_module setuptools} diff --git a/sherpa-fix-aarch64.patch b/sherpa-fix-aarch64.patch new file mode 100644 index 0000000..9918871 --- /dev/null +++ b/sherpa-fix-aarch64.patch @@ -0,0 +1,25 @@ +diff -purN sherpa-4.12.1.orig/sherpa/utils/src/cephes/mconf.h sherpa-4.12.1/sherpa/utils/src/cephes/mconf.h +--- sherpa-4.12.1.orig/sherpa/utils/src/cephes/mconf.h 2020-06-26 20:27:19.000000000 +0200 ++++ sherpa-4.12.1/sherpa/utils/src/cephes/mconf.h 2020-10-14 14:44:53.565068804 +0200 +@@ -173,6 +173,10 @@ typedef struct + /* Define to support tiny denormal numbers, else undefine. */ + #define DENORMAL 1 + ++/* https://github.com/sherpa/sherpa/issues/970 */ ++#define NOINFINITIES ++#define NONANS ++ + /* Define to ask for infinity support, else undefine. */ + #define INFINITIES 1 + #ifdef NOINFINITIES +--- sherpa-4.12.1.orig/sherpa/tests/test_fit_unit.py 2020-06-26 20:27:19.000000000 +0200 ++++ sherpa-4.12.1/sherpa/tests/test_fit_unit.py 2020-10-14 15:08:34.798995079 +0200 +@@ -1867,7 +1867,7 @@ def test_fit_single(stat, usestat, usesy + assert fit.method.name == 'levmar' + fr = fit.fit() + assert fr.succeeded +- assert_almost_equal(fr.statval, finalstat) ++ assert fr.statval == pytest.approx(finalstat, rel=7e-5) + + + @pytest.mark.parametrize("stat,usestat,usesys,finalstat", [