663f010f08
- Enable openblas for python-numpy:gnu-hpc on s390x - Add patch fix-meson-multiple-python-versions.patch: * Ensure meson executes sys.executable when testing Cython. - Update to 1.26.4 * NumPy 1.26.4 is a maintenance release that fixes bugs and regressions discovered after the 1.26.3 release. The Python versions supported by this release are 3.9-3.12. This is the last planned release in the 1.26.x series. * BUG: Restore missing asstr import * MAINT: prepare 1.26.x for further development * BUG: numpy.array_api: fix linalg.cholesky upper decomp... * MAINT, BLD: Fix unused inline functions warnings on clang * TST: Fix test_numeric on riscv64 * MAINT: add newaxis to __all__ in numpy.array_api * BUG: Use large file fallocate on 32 bit linux platforms * TST: Fix test_warning_calls on Python 3.12 * TST: Bump pytz to 2023.3.post1 * BUG: Fix AVX512 build flags on Intel Classic Compiler * BLD: fix potential issue with escape sequences in __config__.py * BLD: unvendor meson-python on 1.26.x and upgrade to meson-python... * MAINT: Include header defining backtrace * BUG: Fix np.quantile([Fraction(2,1)], 0.5) (#24711) - Release 1.26.3 ## Compatibility * f2py will no longer accept ambiguous -m and .pyf CLI OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy1?expand=0&rev=1
54 lines
2.1 KiB
Diff
54 lines
2.1 KiB
Diff
From 59694be29a71b17ad1ce58c865a5524c50bfedee Mon Sep 17 00:00:00 2001
|
|
From: Ralf Gommers <ralf.gommers@gmail.com>
|
|
Date: Fri, 16 Feb 2024 22:18:43 +0100
|
|
Subject: [PATCH] TST: fix Cython compile test which invokes `meson`
|
|
|
|
Closes gh-24956
|
|
|
|
[skip circle]
|
|
---
|
|
numpy/core/tests/test_cython.py | 14 ++++++++++++--
|
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
|
|
Index: numpy-1.26.4/numpy/core/tests/test_cython.py
|
|
===================================================================
|
|
--- numpy-1.26.4.orig/numpy/core/tests/test_cython.py
|
|
+++ numpy-1.26.4/numpy/core/tests/test_cython.py
|
|
@@ -37,6 +37,13 @@ def install_temp(tmpdir_factory):
|
|
srcdir = os.path.join(os.path.dirname(__file__), 'examples', 'cython')
|
|
build_dir = tmpdir_factory.mktemp("cython_test") / "build"
|
|
os.makedirs(build_dir, exist_ok=True)
|
|
+ # Ensure we use the correct Python interpreter even when `meson` is
|
|
+ # installed in a different Python environment (see gh-24956)
|
|
+ native_file = str(build_dir / 'interpreter-native-file.ini')
|
|
+ with open(native_file, 'w') as f:
|
|
+ f.write("[binaries]\n")
|
|
+ f.write(f"python = '{sys.executable}'")
|
|
+
|
|
try:
|
|
subprocess.check_call(["meson", "--version"])
|
|
except FileNotFoundError:
|
|
@@ -44,17 +51,20 @@ def install_temp(tmpdir_factory):
|
|
if sys.platform == "win32":
|
|
subprocess.check_call(["meson", "setup",
|
|
"--buildtype=release",
|
|
- "--vsenv", str(srcdir)],
|
|
+ "--vsenv", "--native-file", native_file,
|
|
+ str(srcdir)],
|
|
cwd=build_dir,
|
|
)
|
|
else:
|
|
- subprocess.check_call(["meson", "setup", str(srcdir)],
|
|
+ subprocess.check_call(["meson", "setup",
|
|
+ "--native-file", native_file, str(srcdir)],
|
|
cwd=build_dir
|
|
)
|
|
subprocess.check_call(["meson", "compile", "-vv"], cwd=build_dir)
|
|
|
|
sys.path.append(str(build_dir))
|
|
|
|
+
|
|
def test_is_timedelta64_object(install_temp):
|
|
import checks
|
|
|