* Adds support for array parameter declaration in fortran... * Added ``bitwise_count`` UFuncs * Add binding for random pyx files * Use AVX512-FP16 SVML content for float16 umath functions * allow int sequences as shape arguments in numpy.memmap * Add .mT attribute for arrays * Create complex scalars from real and imaginary parts * add copy parameter for api.reshape function * make use of locals() in a comprehension fully compatible... * Add array API standard v2022.12 support to numpy.array_api * Change string to bool conversions to be consistent with... * Allow np.info on non-hashable objects with a dtype * let zeros, empty, and empty_like accept dtype classes * Bump C-ABI to 2 but accept older NumPy if compiled against... * Use high accuracy SVML for double precision umath functions * expose PyUFunc_GiveFloatingpointErrors in the dtype API * PyObject_IsTrue and PyObject_Not error handling in setflags * array2string does not add signs for positive integers. * Vectorize np.partition and np.argpartition using AVX-512 * Create helper for conversion to arrays * Add size check for threaded array assignment * Finalize ``fastCopyAndTranpose`` and other old C-funcs/members... * assert_array_less should report max violations instead of... * Introduce tracer for enabled CPU targets on each optimized... * Extend np.add ufunc to work with unicode and byte dtypes * Add find/rfind ufuncs for unicode and byte dtypes * Make ``intp`` ``ssize_t`` and introduce characters nN * Add isdigit/isspace/isdecimal/isnumeric ufuncs for string... * DType API slot for descriptor finalization before array... OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=161
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
|
|
|