summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/python/python3-numpy
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/python/python3-numpy')
-rw-r--r--poky/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch2
-rw-r--r--poky/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch2
-rw-r--r--poky/meta/recipes-devtools/python/python3-numpy/run-ptest16
3 files changed, 15 insertions, 5 deletions
diff --git a/poky/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/poky/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index 437bafb54f..3e08b43587 100644
--- a/poky/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
+++ b/poky/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -1,4 +1,4 @@
-From ad6c0196e4c97ca37368610c010e46c90a4749b4 Mon Sep 17 00:00:00 2001
+From b036c984b019d941ead2efd5a05d1588c4bc193a Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Thu, 10 Dec 2015 13:20:30 +0200
Subject: [PATCH] Don't search /usr and so on for libraries by default to
diff --git a/poky/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch b/poky/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch
index 514073d94e..8b39b7bcfe 100644
--- a/poky/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch
+++ b/poky/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch
@@ -1,4 +1,4 @@
-From 061a8ae1d1d000892d6dba89a444922e7a28804b Mon Sep 17 00:00:00 2001
+From 45d76002bc989a9098141f2bfcd2d2fabc5a04d5 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Fri, 29 Sep 2023 22:53:24 +0100
Subject: [PATCH] This regex decides whether to use O3 opimisation on numpy or
diff --git a/poky/meta/recipes-devtools/python/python3-numpy/run-ptest b/poky/meta/recipes-devtools/python/python3-numpy/run-ptest
index 9a1c72aeb1..6e76dffc59 100644
--- a/poky/meta/recipes-devtools/python/python3-numpy/run-ptest
+++ b/poky/meta/recipes-devtools/python/python3-numpy/run-ptest
@@ -1,5 +1,15 @@
-#!/usr/bin/env python3
+#!/bin/sh
-import numpy
-numpy.test(label='full', verbose=2)
+# By default, numpy will use /tmp as the root path for temporary files used
+# during tests, but if this is a tmpfs it may fill up quickly and cause many of
+# the tests to report "no space left on device" errors. Create a custom
+# directory for these and point pytest at it so we can take advantage of the
+# storage provided in the rootfs.
+export PYTEST_DEBUG_TEMPROOT="/usr/lib/python3-numpy/ptest/tmp"
+mkdir -p "$PYTEST_DEBUG_TEMPROOT"
+# test_mem_policy fails if there's no C compiler present, but we don't want to
+# include gcc as a ptest dependency, so skip that. test_big_arrays uses up a
+# large amount of storage, so skip that too.
+pytest --automake -m "not slow" -k "not test_mem_policy and not test_big_arrays" /usr/lib/python3.*/site-packages/numpy
+rm -rf "$PYTEST_DEBUG_TEMPROOT"