Skip to contentSkip to conversation

package/python-numpy: bump to version 1.16.2

PATCH New Fabrice Fontaine 3 participants 3 messages Mar 16, 2019 – Jul 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-numpy: bump to version 1.16.2

- Update patches and send them upstream
- Update license hash (typos fixed and year updated)

---
 .../0001-Don-t-use-fenv.h-on-uClibc.patch          | 30 +++++++++++++
 package/python-numpy/0001-no-fenv-on-uclibc.patch  | 49 ----------------------
 ...2-FIX-no-FPU-exceptions-bits-on-ARC-glibc.patch | 31 ++++++++++++++
 .../0003-no-FPU-exceptions-bits-on-ARC-glibc.patch | 42 -------------------
 package/python-numpy/python-numpy.hash             |  6 +--
 package/python-numpy/python-numpy.mk               |  2 +-
 6 files changed, 65 insertions(+), 95 deletions(-)
 create mode 100644 package/python-numpy/0001-Don-t-use-fenv.h-on-uClibc.patch
 delete mode 100644 package/python-numpy/0001-no-fenv-on-uclibc.patch
 create mode 100644 package/python-numpy/0002-FIX-no-FPU-exceptions-bits-on-ARC-glibc.patch
 delete mode 100644 package/python-numpy/0003-no-FPU-exceptions-bits-on-ARC-glibc.patch
package/python-numpy/0001-Don-t-use-fenv.h-on-uClibc.patch new file +30 -0
new file mode 100644
index 0000000000..8b3937a1ba
@@ -0,0 +1,30 @@
+From 52b47439d17463304e5bd7974dec17ced0b0f24a Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 16 Mar 2019 10:38:27 +0100
+Subject: [PATCH] Don't use <fenv.h> on uClibc
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Signed-off-by: Alexey Brodkin <[email protected]>
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: https://github.com/numpy/numpy/pull/13137]
+---
+ numpy/core/src/npymath/ieee754.c.src | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src
+index d960838c8..f3f15f841 100644
+--- a/numpy/core/src/npymath/ieee754.c.src
++++ b/numpy/core/src/npymath/ieee754.c.src
+@@ -681,7 +681,8 @@ void npy_set_floatstatus_invalid(void)
+     fp_raise_xcp(FP_INVALID);
+ }
+ 
+-#elif defined(_MSC_VER) || (defined(__osf__) && defined(__alpha))
++#elif defined(_MSC_VER) || (defined(__osf__) && defined(__alpha)) || \
++      defined (__UCLIBC__)
+ 
+ /*
+  * By using a volatile floating point value,
+-- 
+2.14.1
+
package/python-numpy/0001-no-fenv-on-uclibc.patch deleted +0 -49

49 lines not on this page · raw message

package/python-numpy/0002-FIX-no-FPU-exceptions-bits-on-ARC-glibc.patch new file +31 -0
new file mode 100644
index 0000000000..ece52118d7
@@ -0,0 +1,31 @@
+From 1125f1ee33324bc91b4e8dd9da49163af572d04a Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Sat, 16 Mar 2019 10:48:25 +0100
+Subject: [PATCH] FIX: no FPU exceptions bits on ARC glibc
+
+The FPU exceptions bits are missing in fenv.h in glibc for ARC
+architecture.
+
+Signed-off-by: Evgeniy Didin <[email protected]>
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: https://github.com/numpy/numpy/pull/13137]
+---
+ numpy/core/src/npymath/ieee754.c.src | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/numpy/core/src/npymath/ieee754.c.src b/numpy/core/src/npymath/ieee754.c.src
+index f3f15f841..3f66b24a4 100644
+--- a/numpy/core/src/npymath/ieee754.c.src
++++ b/numpy/core/src/npymath/ieee754.c.src
+@@ -682,7 +682,7 @@ void npy_set_floatstatus_invalid(void)
+ }
+ 
+ #elif defined(_MSC_VER) || (defined(__osf__) && defined(__alpha)) || \
+-      defined (__UCLIBC__)
++      defined (__UCLIBC__) || (defined(__arc__) && defined(__GLIBC__))
+ 
+ /*
+  * By using a volatile floating point value,
+-- 
+2.14.1
+
package/python-numpy/0003-no-FPU-exceptions-bits-on-ARC-glibc.patch deleted +0 -42

42 lines not on this page · raw message

package/python-numpy/python-numpy.hash +3 -3
index 7c7f446118..ef2aa7f16d 100644
@@ -1,4 +1,4 @@
-# Copied from https://github.com/numpy/numpy/releases/tag/v1.15.1
-sha256	3c1ccce5d935ef8df16ae0595b459ef08a5cdb05aee195ebc04b9d89a72be7fa	numpy-1.15.1.tar.gz
+# Copied from https://github.com/numpy/numpy/releases/tag/v1.16.2
+sha256	8088221e6e27da8d5907729f0bfe798f526836f22cc59ae83a0f867e67416a3e	numpy-1.16.2.tar.gz
 # License files, locally calculated
-sha256	9e85ee1c3f11444243c9b7667721592a01f1cd90cb28ad937ac99f6241d6b685	LICENSE.txt
+sha256	6b5086f61fe0c71564a79304ecbaa60f11fa3f3debf82f73d16a611cab102adc	LICENSE.txt
package/python-numpy/python-numpy.mk +1 -1
index 26a10c377b..20f42eab69 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PYTHON_NUMPY_VERSION = 1.15.1
+PYTHON_NUMPY_VERSION = 1.16.2
 PYTHON_NUMPY_SOURCE = numpy-$(PYTHON_NUMPY_VERSION).tar.gz
 PYTHON_NUMPY_SITE = https://github.com/numpy/numpy/releases/download/v$(PYTHON_NUMPY_VERSION)
 PYTHON_NUMPY_LICENSE = BSD-3-Clause
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 package/python-numpy: bump to version 1.16.2

Quoted 4 lines · On Sat, 16 Mar 2019 12:49:43 +0100 Fabrice Fontaine…

- Update patches and send them upstream
- Update license hash (typos fixed and year updated)

Quoted 12 lines
---
 .../0001-Don-t-use-fenv.h-on-uClibc.patch          | 30 +++++++++++++
 package/python-numpy/0001-no-fenv-on-uclibc.patch  | 49 ----------------------
 ...2-FIX-no-FPU-exceptions-bits-on-ARC-glibc.patch | 31 ++++++++++++++
 .../0003-no-FPU-exceptions-bits-on-ARC-glibc.patch | 42 -------------------
 package/python-numpy/python-numpy.hash             |  6 +--
 package/python-numpy/python-numpy.mk               |  2 +-
 6 files changed, 65 insertions(+), 95 deletions(-)
 create mode 100644 package/python-numpy/0001-Don-t-use-fenv.h-on-uClibc.patch
 delete mode 100644 package/python-numpy/0001-no-fenv-on-uclibc.patch
 create mode 100644 package/python-numpy/0002-FIX-no-FPU-exceptions-bits-on-ARC-glibc.patch
 delete mode 100644 package/python-numpy/0003-no-FPU-exceptions-bits-on-ARC-glibc.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/python-numpy: bump to version 1.16.2

Hi Fabrice,

Le 17/03/2019 ? 11:14, Thomas Petazzoni a ?crit?:

Quoted 6 lines
Quoted 3 lines · On Sat, 16 Mar 2019 12:49:43 +0100 Fabrice Fontaine…

- Update patches and send them upstream
- Update license hash (typos fixed and year updated)

Quoted 10 lines
Quoted 10 lines
---
 .../0001-Don-t-use-fenv.h-on-uClibc.patch          | 30 +++++++++++++
 package/python-numpy/0001-no-fenv-on-uclibc.patch  | 49 ----------------------
 ...2-FIX-no-FPU-exceptions-bits-on-ARC-glibc.patch | 31 ++++++++++++++
 .../0003-no-FPU-exceptions-bits-on-ARC-glibc.patch | 42 -------------------
 package/python-numpy/python-numpy.hash             |  6 +--
 package/python-numpy/python-numpy.mk               |  2 +-
 6 files changed, 65 insertions(+), 95 deletions(-)
 create mode 100644 package/python-numpy/0001-Don-t-use-fenv.h-on-uClibc.patch

This patch break python-numpy at runtime see [1] since it now require fenv.h [2].

Alpine Linux (and other musl c library distros) support
-------------------------------------------------------
We now default to use fenv.h for floating point status error reporting. Previously we had a broken default that sometimes would not report underflow, overflow, and invalid floating point operations. Now we can support non-glibc distrubutions like Alpine Linux as long as they ship fenv.h.

With patch 0001 applied some floating point status function are missing:

* Define floating point status functions. We must define
* npy_get_floatstatus_barrier, npy_clear_floatstatus_barrier,
* npy_set_floatstatus_{divbyzero, overflow, underflow, invalid}
* for all supported platforms.

I believe we should disable python-numpy for uClibc since it doesn't provide fenv.h

[1] http://patchwork.ozlabs.org/patch/1112759
[2] https://github.com/numpy/numpy/commit/367f05a9d0bab03efc9dc394f0019ea6490e81a5

Best regards,
Romain

Quoted 8 lines
Quoted 3 lines
 delete mode 100644 package/python-numpy/0001-no-fenv-on-uclibc.patch
 create mode 100644 package/python-numpy/0002-FIX-no-FPU-exceptions-bits-on-ARC-glibc.patch
 delete mode 100644 package/python-numpy/0003-no-FPU-exceptions-bits-on-ARC-glibc.patch

Applied to master, thanks.

Thomas